Get<>(dict, key, defaultVal) Get<>(dict, key, defaultVal) Get<>(dict, key1, key2, defaultVal) IndexOfSubarray<>(sourceArray, findWhat, startIndex, sourceLength, comparer) Insert<>(array, startIndex, values) Insert<>(array, startIndex, value) Remove<>(array, startIndex, length) SubarrayEquals<>(sourceArray, sourceStartIndex, otherArray, otherStartIndex, length, comparer)
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 parameters| TKey | This type parameter is not documented. | | TValue | This type parameter is not documented. |
Parameters| this 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. |
|