ImmutableArrayExtensions::ToDictionary<TKey, T> Method (ImmutableArray<T>, Func<T, TKey>^)
Creates a dictionary based on the contents of this array.
Assembly: System.Collections.Immutable (in System.Collections.Immutable.dll)
public: generic<typename TKey, typename T> [ExtensionAttribute] static Dictionary<TKey, T>^ ToDictionary( ImmutableArray<T> immutableArray, Func<T, TKey>^ keySelector )
Parameters
- immutableArray
-
Type:
System.Collections.Immutable::ImmutableArray<T>
The array to create a dictionary from.
- keySelector
-
Type:
System::Func<T, TKey>^
The key selector.
Return Value
Type: System.Collections.Generic::Dictionary<TKey, T>^The newly initialized dictionary.
Type Parameters
- TKey
The type of the key.
- T
The type of element contained by the collection.
Show: