FrozenSet.Create 方法

定义

重载

Create<T>(ReadOnlySpan<T>)

创建具有指定值的 FrozenSet<T>

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

创建具有指定值的 FrozenSet<T>

Create<T>(ReadOnlySpan<T>)

Source:
FrozenSet.cs

创建具有指定值的 FrozenSet<T>

public:
generic <typename T>
 static System::Collections::Frozen::FrozenSet<T> ^ Create(ReadOnlySpan<T> source);
public static System.Collections.Frozen.FrozenSet<T> Create<T> (scoped ReadOnlySpan<T> source);
static member Create : ReadOnlySpan<'T> -> System.Collections.Frozen.FrozenSet<'T>
Public Function Create(Of T) (source As ReadOnlySpan(Of T)) As FrozenSet(Of T)

类型参数

T

集中的值的类型。

参数

source
ReadOnlySpan<T>

用于填充集的值。

返回

冻结集。

适用于

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

Source:
FrozenSet.cs

创建具有指定值的 FrozenSet<T>

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

类型参数

T

集中的值的类型。

参数

equalityComparer
IEqualityComparer<T>

用于比较相等值的比较器实现。 如果 null,则使用 Default

source
ReadOnlySpan<T>

用于填充集的值。

返回

冻结集。

适用于