ImmutableSortedSet.ToImmutableSortedSet 方法

定义

重载

ToImmutableSortedSet<TSource>(IEnumerable<TSource>)

枚举序列,并生成其内容的不可变排序集。

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

从生成器集的当前内容创建不可变排序集。

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

枚举序列,生成其内容的不可变排序集,并使用指定的比较器。

ToImmutableSortedSet<TSource>(IEnumerable<TSource>)

枚举序列,并生成其内容的不可变排序集。

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

序列中元素的类型。

参数

source
IEnumerable<TSource>

要枚举的序列。

返回

ImmutableSortedSet<TSource>

一个不可变排序集,其中包含指定序列中的项。

适用于

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

从生成器集的当前内容创建不可变排序集。

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

不可变排序集中元素的类型。

参数

builder
ImmutableSortedSet<TSource>.Builder

要从中创建不可变排序集的生成器。

返回

ImmutableSortedSet<TSource>

包含生成器集中的当前内容的不可变排序集。

适用于

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

枚举序列,生成其内容的不可变排序集,并使用指定的比较器。

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

序列中元素的类型。

参数

source
IEnumerable<TSource>

要枚举的序列。

comparer
IComparer<TSource>

用于初始化排序集并向其中添加成员的比较器。

返回

ImmutableSortedSet<TSource>

一个不可变排序集,其中包含指定序列中的项。

适用于