IndexOf<>(source, predicate, startIndex) IndexOf<>(source, element, comparer) JoinString<>(values, separator, prefix, suffix, lastSeparator) Order<>(source, comparer) SkipLast<>(source, count, throwIfNotEnough) Split<>(splitWhat, splitWhere) Split<>(source, chunkSize) ToDictionary2<>(source, key1Selector, key2Selector, comparer1, comparer2) ToDictionary2<>(source, key1Selector, key2Selector, elementSelector, comparer1, comparer2)
Legend Class Struct Enum Interface Delegate | Constructor Method Property Event Field |
| Extension method: Dictionary<TKey, TValue> ToDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>>, IEqualityComparer<TKey>, bool)Declarationpublic static Dictionary<TKey, TValue> ToDictionary<TKey, TValue>(
this IEnumerable<KeyValuePair<TKey, TValue>> source,
IEqualityComparer<TKey> comparer = null,
bool ignoreDuplicateKeys = false
) Summary
Converts an IEnumerable<KeyValuePair<TKey, TValue>> into a Dictionary<TKey,
TValue> . Generic type parametersTKey | This type parameter is not documented. | TValue | This type parameter is not documented. |
Parametersthis IEnumerable<KeyValuePair<TKey, TValue>> | source |
Source collection to convert to a dictionary. | IEqualityComparer<TKey> | comparer |
An optional equality comparer to compare keys. | bool | ignoreDuplicateKeys |
If true , duplicate keys are ignored and only their first occurrence added to the dictionary. Otherwise,
a duplicate key causes an exception. |
|