Version:
ToHashSet<TSource>(System.Collections.Generic.IEnumerable<TSource> source, System.Collections.Generic.IEqualityComparer<TSource> comparer) Method
Creates a hash set from the specified source using the specified equality comparer.
Syntax
public
static
HashSet<TSource> ToHashSet<TSource>(IEnumerable<TSource> source, IEqualityComparer<TSource> comparer)
Parameters
- source
- Type: System.Collections.Generic.IEnumerable<TSource>
The source enumeration.
- comparer
- Type: System.Collections.Generic.IEqualityComparer<TSource>
The equality comparer to use.
Returns
Set created from the source elements.
Exceptions
System.ArgumentNullException
|
source is null (Nothing in Visual Basic).
|