We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Creates a HashSet(T) from an IEnumerable(T).
Namespace: CodeJam.CollectionsAssembly: CodeJam (in CodeJam.dll) Version: 2.1.0.0
C#
public static HashSet<TKey> ToHashSet<T, TKey>( this IEnumerable<T> source, Func<T, TKey> keySelector )
VB
<ExtensionAttribute> Public Shared Function ToHashSet(Of T, TKey) ( source As IEnumerable(Of T), keySelector As Func(Of T, TKey) ) As HashSet(Of TKey)
F#
[<ExtensionAttribute>] static member ToHashSet : source : IEnumerable<'T> * keySelector : Func<'T, 'TKey> -> HashSet<'TKey>
Type: HashSet(TKey)A HashSet(T) that contains keys from the input sequence.
In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerable(T). 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).
EnumerableExtensions ClassToHashSet OverloadCodeJam.Collections Namespace