Click or drag to resize
IEnumerableExtensionsToDictionaryT1, T2 Method
Creates a dictionary from a sequence of KeyValuePairs. If the sequence is already a Dictionary, a new Dictionary is still created.

Namespace: Bio.Util
Assembly: Bio.Core (in Bio.Core.dll) Version: 2.0.0.1 (2.0.0.1)
Syntax
public static Dictionary<T1, T2> ToDictionary<T1, T2>(
	this IEnumerable<KeyValuePair<T1, T2>> pairSequence
)

Parameters

pairSequence
Type: System.Collections.GenericIEnumerableKeyValuePairT1, T2
the input pair sequence

Type Parameters

T1
the type of Key
T2
the type of Value

Return Value

Type: DictionaryT1, T2
a Dictionary

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerableKeyValuePairT1, T2. 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