ImmutableHashSet.CreateRange 方法

定義

多載

CreateRange<T>(IEnumerable<T>)

建立新的不可變雜湊集,其中已預先填入指定項目。

CreateRange<T>(IEqualityComparer<T>, IEnumerable<T>)

建立新的不可變雜湊集,其中包含指定項目,且針對集合類型使用指定的相等比較子。

CreateRange<T>(IEnumerable<T>)

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

建立新的不可變雜湊集,其中已預先填入指定項目。

public:
generic <typename T>
 static System::Collections::Immutable::ImmutableHashSet<T> ^ CreateRange(System::Collections::Generic::IEnumerable<T> ^ items);
public static System.Collections.Immutable.ImmutableHashSet<T> CreateRange<T> (System.Collections.Generic.IEnumerable<T> items);
static member CreateRange : seq<'T> -> System.Collections.Immutable.ImmutableHashSet<'T>
Public Function CreateRange(Of T) (items As IEnumerable(Of T)) As ImmutableHashSet(Of T)

類型參數

T

由集合所儲存的項目類型。

參數

items
IEnumerable<T>

要加入至雜湊集的項目。

傳回

新的不可變雜湊集,其中包含指定的項目。

適用於

CreateRange<T>(IEqualityComparer<T>, IEnumerable<T>)

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

建立新的不可變雜湊集,其中包含指定項目,且針對集合類型使用指定的相等比較子。

public:
generic <typename T>
 static System::Collections::Immutable::ImmutableHashSet<T> ^ CreateRange(System::Collections::Generic::IEqualityComparer<T> ^ equalityComparer, System::Collections::Generic::IEnumerable<T> ^ items);
public static System.Collections.Immutable.ImmutableHashSet<T> CreateRange<T> (System.Collections.Generic.IEqualityComparer<T> equalityComparer, System.Collections.Generic.IEnumerable<T> items);
public static System.Collections.Immutable.ImmutableHashSet<T> CreateRange<T> (System.Collections.Generic.IEqualityComparer<T>? equalityComparer, System.Collections.Generic.IEnumerable<T> items);
static member CreateRange : System.Collections.Generic.IEqualityComparer<'T> * seq<'T> -> System.Collections.Immutable.ImmutableHashSet<'T>
Public Function CreateRange(Of T) (equalityComparer As IEqualityComparer(Of T), items As IEnumerable(Of T)) As ImmutableHashSet(Of T)

類型參數

T

集合中儲存之項目的類型。

參數

equalityComparer
IEqualityComparer<T>

比較集合中物件相等所使用的物件。

items
IEnumerable<T>

在套用不變性之前加入集合的項目。

傳回

新的不可變雜湊集。

適用於