| CollectionsExtensionsToFastKeyedCollectionTKey, TSource Method |
Namespace:
Cauldron
Assembly:
Cauldron.Collections (in Cauldron.Collections.dll) Version: 1.0.0
Syntax public static FastKeyedCollection<TKey, TSource> ToFastKeyedCollection<TKey, TSource>(
this IEnumerable<TSource> source,
Func<TSource, TKey> keySelector
)
where TSource : class
Parameters
- source
- Type: System.Collections.GenericIEnumerableTSource
An IEnumerableT to create a KeyedCollectionTKey, TItem from.
- keySelector
- Type: SystemFuncTSource, TKey
A function to extract a key from each element.
Type Parameters
- TKey
- The type of the key returned by keySelector.
- TSource
- The type of the elements of source.
Return Value
Type:
FastKeyedCollectionTKey,
TSource
A
KeyedCollectionTKey, TItem that contains values of
source.
Usage Note
In 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).
See Also