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)

public ref class ImmutableSortedSet abstract sealed
public static class ImmutableSortedSet
type ImmutableSortedSet = class
Public Module ImmutableSortedSet
Inheritance
ImmutableSortedSet

Methods

Create<T>()

Creates an empty immutable sorted set.

Create<T>(IComparer<T>)

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

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>(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>)

Enumerates a sequence and produces an immutable sorted set of its contents.

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

Enumerates a sequence, produces an immutable sorted set of its contents, and uses the specified comparer.

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

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

Applies to

Thread Safety

This type is thread safe.