Share via


ImmutableSortedSet.Create 方法

定义

重载

Create<T>()

创建一个空的不可变排序集。

Create<T>(IComparer<T>)

创建使用指定比较器的空不可变排序集。

Create<T>(ReadOnlySpan<T>)

创建包含指定项数组的新不可变排序集。

Create<T>(T)

创建包含指定项的新不可变排序集。

Create<T>(T[])

创建包含指定项数组的新不可变排序集。

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

创建预填充指定项的新不可变集合。

Create<T>(IComparer<T>, T)

创建包含指定项并使用指定比较器的新不可变排序集。

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

创建包含指定项数组并使用指定比较器的新不可变排序集。

Create<T>()

Source:
ImmutableSortedSet.cs
Source:
ImmutableSortedSet.cs
Source:
ImmutableSortedSet.cs

创建一个空的不可变排序集。

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

类型参数

T

要存储在不可变集内的项的类型。

返回

空的不可变排序集。

适用于

Create<T>(IComparer<T>)

Source:
ImmutableSortedSet.cs
Source:
ImmutableSortedSet.cs
Source:
ImmutableSortedSet.cs

创建使用指定比较器的空不可变排序集。

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

类型参数

T

不可变集内的项的类型。

参数

comparer
IComparer<T>

比较集内的项时要使用的实现。

返回

空的不可变集。

适用于

Create<T>(ReadOnlySpan<T>)

Source:
ImmutableSortedSet.cs
Source:
ImmutableSortedSet.cs

创建包含指定项数组的新不可变排序集。

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

类型参数

T

不可变集内的项的类型。

参数

items
ReadOnlySpan<T>

一个范围,其中包含用于预填充集的项。

返回

包含指定项的新不可变集。

适用于

Create<T>(T)

Source:
ImmutableSortedSet.cs
Source:
ImmutableSortedSet.cs
Source:
ImmutableSortedSet.cs

创建包含指定项的新不可变排序集。

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

类型参数

T

不可变集内的项的类型。

参数

item
T

用于预先填充集的项。

返回

包含指定项的新不可变集。

适用于

Create<T>(T[])

Source:
ImmutableSortedSet.cs
Source:
ImmutableSortedSet.cs
Source:
ImmutableSortedSet.cs

创建包含指定项数组的新不可变排序集。

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

类型参数

T

不可变集内的项的类型。

参数

items
T[]

一个数组,其中包含用于预先填充集的项。

返回

包含指定项的新不可变集。

适用于

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

Source:
ImmutableSortedSet.cs
Source:
ImmutableSortedSet.cs

创建预填充指定项的新不可变集合。

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

类型参数

T

集合存储的项的类型。

参数

comparer
IComparer<T>

比较器。

items
ReadOnlySpan<T>

要预填充的项。

返回

新的不可变集合。

适用于

Create<T>(IComparer<T>, T)

Source:
ImmutableSortedSet.cs
Source:
ImmutableSortedSet.cs
Source:
ImmutableSortedSet.cs

创建包含指定项并使用指定比较器的新不可变排序集。

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

类型参数

T

存储在不可变集内的项的类型。

参数

comparer
IComparer<T>

比较集内的项时要使用的实现。

item
T

用于预先填充集的项。

返回

包含指定项的新不可变集。

适用于

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

Source:
ImmutableSortedSet.cs
Source:
ImmutableSortedSet.cs
Source:
ImmutableSortedSet.cs

创建包含指定项数组并使用指定比较器的新不可变排序集。

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

类型参数

T

不可变集内的项的类型。

参数

comparer
IComparer<T>

比较集内的项时要使用的实现。

items
T[]

一个数组,其中包含用于预先填充集的项。

返回

包含指定项的新不可变集。

适用于