Class NameValueCollectionExtensions
- Namespace
- Cuemon.Extensions.Collections.Specialized
- Assembly
- Cuemon.Extensions.Collections.Specialized.dll
Extension methods for the NameValueCollection class.
public static class NameValueCollectionExtensions
- Inheritance
-
NameValueCollectionExtensions
Methods
ContainsKey(NameValueCollection, string)
Determines whether the specified nvc contains an entry with the specified key.
public static bool ContainsKey(this NameValueCollection nvc, string key)
Parameters
nvcNameValueCollectionThe NameValueCollection to extend.
keystringThe key to locate in
nvc.
Returns
- bool
trueif the specifiednvccontains an entry with thekey; otherwise,false.
Remarks
This method performs an OrdinalIgnoreCase search for key.
ToDictionary(NameValueCollection, Action<DelimitedStringOptions>)
Creates a IDictionary<TKey, TValue> from the specified nvc.
public static IDictionary<string, string[]> ToDictionary(this NameValueCollection nvc, Action<DelimitedStringOptions> setup = null)
Parameters
nvcNameValueCollectionThe NameValueCollection to extend.
setupAction<DelimitedStringOptions>The DelimitedStringOptions which may be configured.
Returns
- IDictionary<string, string[]>
A IDictionary<TKey, TValue> that is equivalent to the specified
nvc.
Exceptions
- ArgumentNullException
nvccannot be null.