ImmutableSortedSet.ToImmutableSortedSet 方法

定义

重载

ToImmutableSortedSet<TSource>(IEnumerable<TSource>)

枚举序列,并生成其内容的不可变排序集。Enumerates a sequence and produces an immutable sorted set of its contents.

ToImmutableSortedSet<TSource>(ImmutableSortedSet<TSource>.Builder)

从生成器集的当前内容创建不可变排序集。Creates an immutable sorted set from the current contents of the builder's set.

ToImmutableSortedSet<TSource>(IEnumerable<TSource>, IComparer<TSource>)

枚举序列,生成其内容的不可变排序集,并使用指定的比较器。Enumerates a sequence, produces an immutable sorted set of its contents, and uses the specified comparer.

ToImmutableSortedSet<TSource>(IEnumerable<TSource>)

枚举序列,并生成其内容的不可变排序集。Enumerates a sequence and produces an immutable sorted set of its contents.

public:
generic <typename TSource>
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Immutable::ImmutableSortedSet<TSource> ^ ToImmutableSortedSet(System::Collections::Generic::IEnumerable<TSource> ^ source);
public static System.Collections.Immutable.ImmutableSortedSet<TSource> ToImmutableSortedSet<TSource> (this System.Collections.Generic.IEnumerable<TSource> source);
static member ToImmutableSortedSet : seq<'Source> -> System.Collections.Immutable.ImmutableSortedSet<'Source>
<Extension()>
Public Function ToImmutableSortedSet(Of TSource) (source As IEnumerable(Of TSource)) As ImmutableSortedSet(Of TSource)

类型参数

TSource

序列中元素的类型。The type of the elements in the sequence.

参数

source
IEnumerable<TSource>

要枚举的序列。The sequence to enumerate.

返回

ImmutableSortedSet<TSource>

一个不可变排序集,其中包含指定序列中的项。An immutable sorted set that contains the items in the specified sequence.

适用于

产品 Introduced

ToImmutableSortedSet<TSource>(ImmutableSortedSet<TSource>.Builder)

从生成器集的当前内容创建不可变排序集。Creates an immutable sorted set from the current contents of the builder's set.

public:
generic <typename TSource>
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Immutable::ImmutableSortedSet<TSource> ^ ToImmutableSortedSet(System::Collections::Immutable::ImmutableSortedSet<TSource>::Builder ^ builder);
public static System.Collections.Immutable.ImmutableSortedSet<TSource> ToImmutableSortedSet<TSource> (this System.Collections.Immutable.ImmutableSortedSet<TSource>.Builder builder);
static member ToImmutableSortedSet : System.Collections.Immutable.ImmutableSortedSet<'Source>.Builder -> System.Collections.Immutable.ImmutableSortedSet<'Source>
<Extension()>
Public Function ToImmutableSortedSet(Of TSource) (builder As ImmutableSortedSet(Of TSource).Builder) As ImmutableSortedSet(Of TSource)

类型参数

TSource

不可变排序集中元素的类型。The type of the elements in the immutable sorted set.

参数

builder
ImmutableSortedSet<TSource>.Builder

要从中创建不可变排序集的生成器。The builder to create the immutable sorted set from.

返回

ImmutableSortedSet<TSource>

包含生成器集中的当前内容的不可变排序集。An immutable sorted set that contains the current contents in the builder's set.

适用于

产品 Introduced

ToImmutableSortedSet<TSource>(IEnumerable<TSource>, IComparer<TSource>)

枚举序列,生成其内容的不可变排序集,并使用指定的比较器。Enumerates a sequence, produces an immutable sorted set of its contents, and uses the specified comparer.

public:
generic <typename TSource>
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Immutable::ImmutableSortedSet<TSource> ^ ToImmutableSortedSet(System::Collections::Generic::IEnumerable<TSource> ^ source, System::Collections::Generic::IComparer<TSource> ^ comparer);
public static System.Collections.Immutable.ImmutableSortedSet<TSource> ToImmutableSortedSet<TSource> (this System.Collections.Generic.IEnumerable<TSource> source, System.Collections.Generic.IComparer<TSource> comparer);
public static System.Collections.Immutable.ImmutableSortedSet<TSource> ToImmutableSortedSet<TSource> (this System.Collections.Generic.IEnumerable<TSource> source, System.Collections.Generic.IComparer<TSource>? comparer);
static member ToImmutableSortedSet : seq<'Source> * System.Collections.Generic.IComparer<'Source> -> System.Collections.Immutable.ImmutableSortedSet<'Source>
<Extension()>
Public Function ToImmutableSortedSet(Of TSource) (source As IEnumerable(Of TSource), comparer As IComparer(Of TSource)) As ImmutableSortedSet(Of TSource)

类型参数

TSource

序列中元素的类型。The type of the elements in the sequence.

参数

source
IEnumerable<TSource>

要枚举的序列。The sequence to enumerate.

comparer
IComparer<TSource>

用于初始化排序集并向其中添加成员的比较器。The comparer to use for initializing and adding members to the sorted set.

返回

ImmutableSortedSet<TSource>

一个不可变排序集,其中包含指定序列中的项。An immutable sorted set that contains the items in the specified sequence.

适用于

产品 Introduced