 | 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
Syntaxpublic static Dictionary<TKey, TElement> ToDictionary<TSource, TKey, TElement>(
this BcfReadOnlyArrayList<TSource> source,
Func<TSource, TKey> keySelector,
Func<TSource, TElement> elementSelector
)
<ExtensionAttribute>
Public Shared Function ToDictionary(Of TSource, TKey, TElement) (
source As BcfReadOnlyArrayList(Of TSource),
keySelector As Func(Of TSource, TKey),
elementSelector As Func(Of TSource, TElement)
) As Dictionary(Of TKey, TElement)
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,
TElementThe 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