ImmutableHashSet.ToImmutableHashSet 方法

定義

多載

名稱 Description
ToImmutableHashSet<TSource>(IEnumerable<TSource>)

列舉序列,併產生其內容的不可變哈希集。

ToImmutableHashSet<TSource>(ImmutableHashSet<TSource>.Builder)

從建構者集合的當前內容建立一個不可變的雜湊集。

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

列舉序列、產生其內容的不可變哈希集,並使用集合類型的指定相等比較子。

ToImmutableHashSet<TSource>(IEnumerable<TSource>)

來源:
ImmutableHashSet.cs
來源:
ImmutableHashSet.cs
來源:
ImmutableHashSet.cs
來源:
ImmutableHashSet.cs
來源:
ImmutableHashSet.cs
來源:
ImmutableHashSet.cs

列舉序列,併產生其內容的不可變哈希集。

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)

類型參數

TSource

序列中元素的類型。

參數

source
IEnumerable<TSource>

要列舉的順序。

傳回

ImmutableHashSet<TSource>

一個包含指定序列中項目的不可變雜湊集。

適用於

ToImmutableHashSet<TSource>(ImmutableHashSet<TSource>.Builder)

來源:
ImmutableHashSet.cs
來源:
ImmutableHashSet.cs
來源:
ImmutableHashSet.cs
來源:
ImmutableHashSet.cs
來源:
ImmutableHashSet.cs
來源:
ImmutableHashSet.cs

從建構者集合的當前內容建立一個不可變的雜湊集。

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

類型參數

TSource

雜湊集中元素的型別。

參數

builder
ImmutableHashSet<TSource>.Builder

建立器,從中建立不可變雜湊集。

傳回

ImmutableHashSet<TSource>

一個不可變的雜湊集,包含建構者集合中目前的內容。

適用於

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

來源:
ImmutableHashSet.cs
來源:
ImmutableHashSet.cs
來源:
ImmutableHashSet.cs
來源:
ImmutableHashSet.cs
來源:
ImmutableHashSet.cs
來源:
ImmutableHashSet.cs

列舉序列、產生其內容的不可變哈希集,並使用集合類型的指定相等比較子。

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);
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)

類型參數

TSource

序列中元素的類型。

參數

source
IEnumerable<TSource>

要列舉的順序。

equalityComparer
IEqualityComparer<TSource>

用來比較集合中物件以求相等的物件。

傳回

ImmutableHashSet<TSource>

一個不可變雜湊集合,包含指定序列中的項目,並使用指定的等號比較器。

適用於