Enumerable.ToDictionary Method

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

  NameDescription
Public method Static member ToDictionary<TSource, TKey>(IEnumerable<TSource>, Func<TSource, TKey>) Creates a Dictionary<TKey, TValue> from an IEnumerable<T> according to a specified key selector function.
Public method Static member ToDictionary<TSource, TKey>(IEnumerable<TSource>, Func<TSource, TKey>, IEqualityComparer<TKey>) Creates a Dictionary<TKey, TValue> from an IEnumerable<T> according to a specified key selector function and key comparer.
Public method Static member ToDictionary<TSource, TKey, TElement>(IEnumerable<TSource>, Func<TSource, TKey>, Func<TSource, TElement>) Creates a Dictionary<TKey, TValue> from an IEnumerable<T> according to specified key selector and element selector functions.
Public method Static member ToDictionary<TSource, TKey, TElement>(IEnumerable<TSource>, Func<TSource, TKey>, Func<TSource, TElement>, IEqualityComparer<TKey>) Creates a Dictionary<TKey, TValue> from an IEnumerable<T> according to a specified key selector function, a comparer, and an element selector function.
Top
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft