ImmutableHashSet.Create 方法

定義

多載

Create<T>()

建立空白不可變雜湊集。

Create<T>(IEqualityComparer<T>)

建立空白不可變雜湊集,其使用指定之相等比較子

Create<T>(ReadOnlySpan<T>)

建立預先填入指定專案的新不可變集合。

Create<T>(T)

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

Create<T>(T[])

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

Create<T>(IEqualityComparer<T>, ReadOnlySpan<T>)

建立預先填入指定專案的新不可變集合。

Create<T>(IEqualityComparer<T>, T)

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

Create<T>(IEqualityComparer<T>, T[])

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

Create<T>()

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

建立空白不可變雜湊集。

public:
generic <typename T>
 static System::Collections::Immutable::ImmutableHashSet<T> ^ Create();
public static System.Collections.Immutable.ImmutableHashSet<T> Create<T> ();
static member Create : unit -> System.Collections.Immutable.ImmutableHashSet<'T>
Public Function Create(Of T) () As ImmutableHashSet(Of T)

類型參數

T

要在不可變雜湊集中儲存之項目的類型。

傳回

空白不可變雜湊集。

適用於

Create<T>(IEqualityComparer<T>)

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

建立空白不可變雜湊集,其使用指定之相等比較子

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

類型參數

T

不可變雜湊集中之項目的類型。

參數

equalityComparer
IEqualityComparer<T>

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

傳回

空白不可變雜湊集。

適用於

Create<T>(ReadOnlySpan<T>)

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

建立預先填入指定專案的新不可變集合。

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

類型參數

T

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

參數

items
ReadOnlySpan<T>

要預先填入的專案。

傳回

新的不可變集合。

適用於

Create<T>(T)

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

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

public:
generic <typename T>
 static System::Collections::Immutable::ImmutableHashSet<T> ^ Create(T item);
public static System.Collections.Immutable.ImmutableHashSet<T> Create<T> (T item);
static member Create : 'T -> System.Collections.Immutable.ImmutableHashSet<'T>
Public Function Create(Of T) (item As T) As ImmutableHashSet(Of T)

類型參數

T

不可變雜湊集中之項目的類型。

參數

item
T

要預先填入雜湊集的項目。

傳回

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

適用於

Create<T>(T[])

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

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

public:
generic <typename T>
 static System::Collections::Immutable::ImmutableHashSet<T> ^ Create(... cli::array <T> ^ items);
public static System.Collections.Immutable.ImmutableHashSet<T> Create<T> (params T[] items);
static member Create : 'T[] -> System.Collections.Immutable.ImmutableHashSet<'T>
Public Function Create(Of T) (ParamArray items As T()) As ImmutableHashSet(Of T)

類型參數

T

不可變雜湊集中之項目的類型。

參數

items
T[]

其中包含要填入雜湊集之項目的陣列。

傳回

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

適用於

Create<T>(IEqualityComparer<T>, ReadOnlySpan<T>)

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

建立預先填入指定專案的新不可變集合。

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

類型參數

T

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

參數

equalityComparer
IEqualityComparer<T>

相等比較子。

items
ReadOnlySpan<T>

要預先填入的專案。

傳回

新的不可變集合。

適用於

Create<T>(IEqualityComparer<T>, T)

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

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

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

類型參數

T

不可變雜湊集中之項目的類型。

參數

equalityComparer
IEqualityComparer<T>

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

item
T

要預先填入雜湊集的項目。

傳回

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

適用於

Create<T>(IEqualityComparer<T>, T[])

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

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

public:
generic <typename T>
 static System::Collections::Immutable::ImmutableHashSet<T> ^ Create(System::Collections::Generic::IEqualityComparer<T> ^ equalityComparer, ... cli::array <T> ^ items);
public static System.Collections.Immutable.ImmutableHashSet<T> Create<T> (System.Collections.Generic.IEqualityComparer<T> equalityComparer, params T[] items);
public static System.Collections.Immutable.ImmutableHashSet<T> Create<T> (System.Collections.Generic.IEqualityComparer<T>? equalityComparer, params T[] items);
static member Create : System.Collections.Generic.IEqualityComparer<'T> * 'T[] -> System.Collections.Immutable.ImmutableHashSet<'T>
Public Function Create(Of T) (equalityComparer As IEqualityComparer(Of T), ParamArray items As T()) As ImmutableHashSet(Of T)

類型參數

T

不可變雜湊集中儲存之項目的類型。

參數

equalityComparer
IEqualityComparer<T>

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

items
T[]

其中包含要填入雜湊集之項目的陣列。

傳回

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

適用於