ParallelEnumerable::ToDictionary<TSource, TKey> Method (ParallelQuery<TSource>^, Func<TSource, TKey>^, IEqualityComparer<TKey>^)
Assembly: System.Core (in System.Core.dll)
public: generic<typename TSource, typename TKey> [ExtensionAttribute] static Dictionary<TKey, TSource>^ ToDictionary( ParallelQuery<TSource>^ source, Func<TSource, TKey>^ keySelector, IEqualityComparer<TKey>^ comparer )
System::Func< , >^
A function to extract a key from each element.
Return ValueType: System.Collections.Generic::Dictionary< , >^
A Dictionary<TKey, TValue> that contains keys and values.
The type of the elements of source.
The type of the key returned by keySelector.
The query was canceled with the token passed in through WithCancellation.
source or keySelector is a null reference (Nothing in Visual Basic).
keySelector produces a key that is a null reference (Nothing in Visual Basic). -or- keySelector produces duplicate keys for two elements. -or- One or more exceptions occurred during the evaluation of the query.
Available since 8
Available since 4.0
Portable Class Library
Supported in: portable .NET platforms
Available since 8.1