ImmutableSortedSet 类

定义

针对 ImmutableSortedSet<T> 类的实例提供一组初始化方法。

NuGet package: System.Collections.Immutable关于不可变集合和安装方法

public ref class ImmutableSortedSet abstract sealed
public static class ImmutableSortedSet
type ImmutableSortedSet = class
Public Module ImmutableSortedSet
继承
ImmutableSortedSet

方法

Create<T>()

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

Create<T>(IComparer<T>)

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

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

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

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

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

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

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

Create<T>(ReadOnlySpan<T>)

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

Create<T>(T)

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

Create<T>(T[])

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

CreateBuilder<T>()

返回可用于生成不可变排序集的集合。

CreateBuilder<T>(IComparer<T>)

返回可用于生成不可变排序集的集合。

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

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

CreateRange<T>(IEnumerable<T>)

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

ToImmutableSortedSet<TSource>(IEnumerable<TSource>)

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

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

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

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

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

适用于

线程安全性

此类型是线程安全的。