Läs på engelska Redigera

Dela via


ImmutableSortedSet Class

Definition

Provides a set of initialization methods for instances of the ImmutableSortedSet<T> class.

NuGet package: System.Collections.Immutable (about immutable collections and how to install)

C#
public static class ImmutableSortedSet
Inheritance
ImmutableSortedSet

Methods

Create<T>()

Creates an empty immutable sorted set.

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

Creates a new immutable collection prefilled with the specified items.

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

Creates a new immutable sorted set that contains the specified item and uses the specified comparer.

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

Creates a new immutable sorted set that contains the specified array of items and uses the specified comparer.

Create<T>(IComparer<T>)

Creates an empty immutable sorted set that uses the specified comparer.

Create<T>(ReadOnlySpan<T>)

Creates a new immutable sorted set that contains the specified array of items.

Create<T>(T)

Creates a new immutable sorted set that contains the specified item.

Create<T>(T[])

Creates a new immutable sorted set that contains the specified array of items.

CreateBuilder<T>()

Returns a collection that can be used to build an immutable sorted set.

CreateBuilder<T>(IComparer<T>)

Returns a collection that can be used to build an immutable sorted set.

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.

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.

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

Creates an immutable sorted set from the current contents of the builder's set.

Applies to

Produkt Versioner
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10
.NET Standard 2.0 (package-provided)
UWP 10.0

Thread Safety

This type is thread safe.