Soenneker.Extensions.NameValueCollection 4.0.826

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Soenneker.Extensions.NameValueCollection --version 4.0.826
                    
NuGet\Install-Package Soenneker.Extensions.NameValueCollection -Version 4.0.826
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Soenneker.Extensions.NameValueCollection" Version="4.0.826" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Extensions.NameValueCollection" Version="4.0.826" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Extensions.NameValueCollection" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Soenneker.Extensions.NameValueCollection --version 4.0.826
                    
#r "nuget: Soenneker.Extensions.NameValueCollection, 4.0.826"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Soenneker.Extensions.NameValueCollection@4.0.826
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Soenneker.Extensions.NameValueCollection&version=4.0.826
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Extensions.NameValueCollection&version=4.0.826
                    
Install as a Cake Tool

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

alternate text is missing from this package README image Soenneker.Extensions.NameValueCollection

Extension methods for converting, filtering, and otherwise working with NameValueCollection data.

Installation

dotnet add package Soenneker.Extensions.NameValueCollection

Usage

using Soenneker.Extensions.NameValueCollection;

var headers = new NameValueCollection
{
    ["trace-id"] = "abc123",
    ["empty"] = ""
};

Dictionary<string, string> result = headers.ToDictionary();
// { "trace-id": "abc123" }

Null/empty keys and null/empty values are omitted. The resulting dictionary uses StringComparer.Ordinal and is always a new instance. A null or empty collection returns an empty dictionary.

NameValueCollection can hold multiple values for one key. Its indexed getter combines those values into one comma-separated string, and that combined value is what this method stores.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Soenneker.Extensions.NameValueCollection:

Package Downloads
Soenneker.Utils.String

A utility library for useful String operations

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.0.830 0 8/30/2026
4.0.829 0 8/30/2026
4.0.828 0 8/30/2026
4.0.827 0 8/30/2026
4.0.826 0 8/29/2026
4.0.824 30 8/29/2026
4.0.823 44 8/29/2026
4.0.822 38 8/29/2026
4.0.821 348 8/26/2026
4.0.820 98 8/25/2026
4.0.819 79 8/25/2026
4.0.818 604 8/21/2026
4.0.817 595 8/18/2026
4.0.816 594 8/12/2026
4.0.815 620 8/8/2026
4.0.814 381 8/7/2026
4.0.813 918 7/29/2026
4.0.812 301 7/28/2026
4.0.811 164 7/28/2026
4.0.810 105 7/28/2026
Loading failed

Describe extension library scope separately from current API