ImmutableHashSet.ToImmutableHashSet ImmutableHashSet.ToImmutableHashSet ImmutableHashSet.ToImmutableHashSet ImmutableHashSet.ToImmutableHashSet Method

Definition

Overloads

ToImmutableHashSet<TSource>(IEnumerable<TSource>) ToImmutableHashSet<TSource>(IEnumerable<TSource>) ToImmutableHashSet<TSource>(IEnumerable<TSource>) ToImmutableHashSet<TSource>(IEnumerable<TSource>)

Enumerates a sequence and produces an immutable hash set of its contents.

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

Enumerates a sequence, produces an immutable hash set of its contents, and uses the specified equality comparer for the set type.

ToImmutableHashSet<TSource>(IEnumerable<TSource>) ToImmutableHashSet<TSource>(IEnumerable<TSource>) ToImmutableHashSet<TSource>(IEnumerable<TSource>) ToImmutableHashSet<TSource>(IEnumerable<TSource>)

Enumerates a sequence and produces an immutable hash set of its contents.

public:
generic <typename TSource>
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Immutable::ImmutableHashSet<TSource> ^ ToImmutableHashSet(System::Collections::Generic::IEnumerable<TSource> ^ source);
public static System.Collections.Immutable.ImmutableHashSet<TSource> ToImmutableHashSet<TSource> (this System.Collections.Generic.IEnumerable<TSource> source);
static member ToImmutableHashSet : seq<'Source> -> System.Collections.Immutable.ImmutableHashSet<'Source>
<Extension()>
Public Function ToImmutableHashSet(Of TSource) (source As IEnumerable(Of TSource)) As ImmutableHashSet(Of TSource)

Type Parameters

TSource

The type of the elements in the sequence.

Parameters

source
IEnumerable<TSource>

The sequence to enumerate.

Returns

ImmutableHashSet<TSource>

An immutable hash set that contains the items in the specified sequence.

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

Enumerates a sequence, produces an immutable hash set of its contents, and uses the specified equality comparer for the set type.

public:
generic <typename TSource>
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Immutable::ImmutableHashSet<TSource> ^ ToImmutableHashSet(System::Collections::Generic::IEnumerable<TSource> ^ source, System::Collections::Generic::IEqualityComparer<TSource> ^ equalityComparer);
public static System.Collections.Immutable.ImmutableHashSet<TSource> ToImmutableHashSet<TSource> (this System.Collections.Generic.IEnumerable<TSource> source, System.Collections.Generic.IEqualityComparer<TSource> equalityComparer);
static member ToImmutableHashSet : seq<'Source> * System.Collections.Generic.IEqualityComparer<'Source> -> System.Collections.Immutable.ImmutableHashSet<'Source>
<Extension()>
Public Function ToImmutableHashSet(Of TSource) (source As IEnumerable(Of TSource), equalityComparer As IEqualityComparer(Of TSource)) As ImmutableHashSet(Of TSource)

Type Parameters

TSource

The type of the elements in the sequence.

Parameters

source
IEnumerable<TSource>

The sequence to enumerate.

equalityComparer
IEqualityComparer<TSource>

The object to use for comparing objects in the set for equality.

Returns

ImmutableHashSet<TSource>

An immutable hash set that contains the items in the specified sequence and uses the specified equality comparer.

Applies to