Language

ImmutableHashSet.ToImmutableHashSet Method

Definition

Overloads

Name Description
ToImmutableHashSet(IEnumerable)

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

ToImmutableHashSet(ImmutableHashSet.Builder)

Creates an immutable hash set from the current contents of the builder's set.

ToImmutableHashSet(IEnumerable, IEqualityComparer)

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

ToImmutableHashSet(IEnumerable)

Source:
ImmutableHashSet.cs
Source:
ImmutableHashSet.cs
Source:
ImmutableHashSet.cs
Source:
ImmutableHashSet.cs
Source:
ImmutableHashSet.cs
Source:
ImmutableHashSet.cs
Source:
ImmutableHashSet.cs

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

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

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

The sequence to enumerate.

Returns

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

Applies to

ToImmutableHashSet(ImmutableHashSet.Builder)

Source:
ImmutableHashSet.cs
Source:
ImmutableHashSet.cs
Source:
ImmutableHashSet.cs
Source:
ImmutableHashSet.cs
Source:
ImmutableHashSet.cs
Source:
ImmutableHashSet.cs
Source:
ImmutableHashSet.cs

Creates an immutable hash set from the current contents of the builder's set.

public:
generic 
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Immutable::ImmutableHashSet ^ ToImmutableHashSet(System::Collections::Immutable::ImmutableHashSet::Builder ^ builder);
public static System.Collections.Immutable.ImmutableHashSet ToImmutableHashSet(this System.Collections.Immutable.ImmutableHashSet.Builder builder);
static member ToImmutableHashSet : System.Collections.Immutable.ImmutableHashSet<'Source>.Builder -> System.Collections.Immutable.ImmutableHashSet<'Source>

Public Function ToImmutableHashSet(Of TSource) (builder As ImmutableHashSet(Of TSource).Builder) As ImmutableHashSet(Of TSource)

Type Parameters

TSource

The type of the elements in the hash set.

Parameters

builder
ImmutableHashSet.Builder

The builder to create the immutable hash set from.

Returns

An immutable hash set that contains the current contents in the builder's set.

Applies to

ToImmutableHashSet(IEnumerable, IEqualityComparer)

Source:
ImmutableHashSet.cs
Source:
ImmutableHashSet.cs
Source:
ImmutableHashSet.cs
Source:
ImmutableHashSet.cs
Source:
ImmutableHashSet.cs
Source:
ImmutableHashSet.cs
Source:
ImmutableHashSet.cs

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

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

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

The sequence to enumerate.

equalityComparer
IEqualityComparer

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

Returns

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

Applies to