Click or drag to resize

NameValueCollectionExtensionsToDictionaryTValue(NameValueCollection, FuncString, String, FuncString, TValue) Method

Convert the name value collection to a dictionary

Namespace: SanteDB
Assembly: SanteDB.Core.Model (in SanteDB.Core.Model.dll) Version: 3.0.2081-alpha+0a330d5f5a5d3cb3e6e945ef530e94ac5671b49c
Syntax
public static IDictionary<string, TValue> ToDictionary<TValue>(
	this NameValueCollection me,
	Func<string, string> keySelector,
	Func<string[], TValue> valueSelector
)

Parameters

me  NameValueCollection
The NameValueCollection to convert
keySelector  FuncString, String
The transformer for the key
valueSelector  FuncString, TValue
The transformer for the value

Type Parameters

TValue

[Missing <typeparam name="TValue"/> documentation for "M:SanteDB.NameValueCollectionExtensions.ToDictionary``1(System.Collections.Specialized.NameValueCollection,System.Func{System.String,System.String},System.Func{System.String[],``0})"]

Return Value

IDictionaryString, TValue
The converted dictionary

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type NameValueCollection. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also