Click or drag to resize

BcfReadOnlyArrayListExtensionsToDictionaryTSource, TKey, TElement Method (BcfReadOnlyArrayListTSource, FuncTSource, TKey, FuncTSource, TElement)

Creates a dictionary based on the contents of this array.

Namespace:  System.Linq
Assembly:  CalculationWorks.BusinessModel (in CalculationWorks.BusinessModel.dll) Version: 4.2.0
Syntax
public static Dictionary<TKey, TElement> ToDictionary<TSource, TKey, TElement>(
	this BcfReadOnlyArrayList<TSource> source,
	Func<TSource, TKey> keySelector,
	Func<TSource, TElement> elementSelector
)

Parameters

source
Type: CalculationWorks.BusinessModelBcfReadOnlyArrayListTSource
The source.
keySelector
Type: SystemFuncTSource, TKey
The key selector.
elementSelector
Type: SystemFuncTSource, TElement
The element selector.

Type Parameters

TSource
The type of the elements of source.
TKey
The type of the key.
TElement
The type of the element.

Return Value

Type: DictionaryTKey, TElement
The newly initialized dictionary.

Usage Note

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