Enumerable.ToHashSet Method

Definition

Overloads

ToHashSet<TSource>(IEnumerable<TSource>, IEqualityComparer<TSource>)
ToHashSet<TSource>(IEnumerable<TSource>)

ToHashSet<TSource>(IEnumerable<TSource>, IEqualityComparer<TSource>)

public static System.Collections.Generic.HashSet<TSource> ToHashSet<TSource> (this System.Collections.Generic.IEnumerable<TSource> source, System.Collections.Generic.IEqualityComparer<TSource> comparer);
Type Parameters
TSource
Parameters
source
IEnumerable<TSource>
comparer
IEqualityComparer<TSource>
Returns
HashSet<TSource>

ToHashSet<TSource>(IEnumerable<TSource>)

public static System.Collections.Generic.HashSet<TSource> ToHashSet<TSource> (this System.Collections.Generic.IEnumerable<TSource> source);
Type Parameters
TSource
Parameters
source
IEnumerable<TSource>
Returns
HashSet<TSource>

Applies to