LookupExtensionsToReadOnlyLookupTSource, TKey, TElement(IEnumerableTSource, FuncTSource, TKey, FuncTSource, TElement) Method
Namespace: Jodosoft.CollectionsAssembly: Jodosoft.Collections (in Jodosoft.Collections.dll) Version: 2.0
public static IReadOnlyLookup<TKey, TElement> ToReadOnlyLookup<TSource, TKey, TElement>(
this IEnumerable<TSource> source,
Func<TSource, TKey> keySelector,
Func<TSource, TElement> elementSelector
)
<ExtensionAttribute>
Public Shared Function ToReadOnlyLookup(Of TSource, TKey, TElement) (
source As IEnumerable(Of TSource),
keySelector As Func(Of TSource, TKey),
elementSelector As Func(Of TSource, TElement)
) As IReadOnlyLookup(Of TKey, TElement)
public:
[ExtensionAttribute]
generic<typename TSource, typename TKey, typename TElement>
static IReadOnlyLookup<TKey, TElement>^ ToReadOnlyLookup(
IEnumerable<TSource>^ source,
Func<TSource, TKey>^ keySelector,
Func<TSource, TElement>^ elementSelector
)
[<ExtensionAttribute>]
static member ToReadOnlyLookup :
source : IEnumerable<'TSource> *
keySelector : Func<'TSource, 'TKey> *
elementSelector : Func<'TSource, 'TElement> -> IReadOnlyLookup<'TKey, 'TElement>
- source IEnumerableTSource
-
- keySelector FuncTSource, TKey
-
- elementSelector FuncTSource, TElement
-
- TSource
- TKey
- TElement
IReadOnlyLookupTKey,
TElementIn Visual Basic and C#, you can call this method as an instance method on any object of type
IEnumerableTSource. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).