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
source
IEnumerable<TSource>keySelector
Func<TSource, TKey>elementSelector
Func<TSource, TElement>comparer
IEqualityComparer<TKey>
Returns
- Dictionary<TKey, TElement>
Type Parameters
TSource
TKey
TElement
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
source
IEnumerable<TSource>keySelector
Func<TSource, TKey>elementSelector
Func<TSource, TElement>
Returns
- Dictionary<TKey, TElement>
Type Parameters
TSource
TKey
TElement