ImmutableSortedSet.CreateRange 方法

定义

重载

CreateRange<T>(IEnumerable<T>)

创建包含指定项的新不可变集合。Creates a new immutable collection that contains the specified items.

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

创建包含指定项的新不可变集合。Creates a new immutable collection that contains the specified items.

CreateRange<T>(IEnumerable<T>)

创建包含指定项的新不可变集合。Creates a new immutable collection that contains the specified items.

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

类型参数

T

集合存储的项的类型。The type of items stored by the collection.

参数

items
IEnumerable<T>

在集不可变之前要添加到该集内的项。The items to add to the set with before it's immutable.

返回

包含指定项的新不可变集。The new immutable set that contains the specified items.

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

创建包含指定项的新不可变集合。Creates a new immutable collection that contains the specified items.

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

类型参数

T

集合存储的项的类型。The type of items stored by the collection.

参数

comparer
IComparer<T>

用于比较此集内的元素的比较器。The comparer to use to compare elements in this set.

items
IEnumerable<T>

在集不可变之前要添加到该集内的项。The items to add to the set before it's immutable.

返回

包含指定项的新不可变集。The new immutable set that contains the specified items.

适用于