Method ToDictionaryChecked
- Namespace
- FrameworkSystems.FrameworkExceptions
- Assembly
- FrameworkSystems.FrameworkExceptions.dll
ToDictionaryChecked<TSource, TKey, TElement>(IEnumerable<TSource>, Func<TSource, TKey>, Func<TSource, TElement>, IEqualityComparer<TKey>)
Erzeugt ein Dictionary. Bei doppelten Keys wird jeweils nur der erste Eintrag hinzugefügt.
public static Dictionary<TKey, TElement> ToDictionaryChecked<TSource, TKey, TElement>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector, IEqualityComparer<TKey> comparer)
Parameters
sourceIEnumerable<TSource>keySelectorFunc<TSource, TKey>elementSelectorFunc<TSource, TElement>comparerIEqualityComparer<TKey>
Returns
- Dictionary<TKey, TElement>
Type Parameters
TSourceTKeyTElement
ToDictionaryChecked<TSource, TKey, TElement>(IEnumerable<TSource>, Func<TSource, TKey>, Func<TSource, TElement>)
Erzeugt ein Dictionary. Bei doppelten Keys wird jeweils nur der erste Eintrag hinzugefügt.
public static Dictionary<TKey, TElement> ToDictionaryChecked<TSource, TKey, TElement>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector)
Parameters
sourceIEnumerable<TSource>keySelectorFunc<TSource, TKey>elementSelectorFunc<TSource, TElement>
Returns
- Dictionary<TKey, TElement>
Type Parameters
TSourceTKeyTElement