System.Collections.Immutable by Microsoft

<PackageReference Include="System.Collections.Immutable" Version="5.0.0-preview.4.20251.6" />

.NET API 188,792 bytes

 IImmutableSet<T>

Represents a set of elements that can only be modified by creating a new instance of the set. NuGet package: System.Collections.Immutable (about immutable collections and how to install)
IImmutableSet<T> Add(T value)

Adds the specified element to this immutable set.

Retrieves an empty immutable set that has the same sorting and ordering semantics as this instance.

bool Contains(T value)

Determines whether this immutable set contains a specified element.

Removes the elements in the specified collection from the current immutable set.

Creates an immutable set that contains only elements that exist in this set and the specified set.

Determines whether the current immutable set is a proper (strict) subset of the specified collection.

Determines whether the current immutable set is a proper (strict) superset of the specified collection.

bool IsSubsetOf(IEnumerable<T> other)

Determines whether the current immutable set is a subset of a specified collection.

bool IsSupersetOf(IEnumerable<T> other)

Determines whether the current immutable set is a superset of a specified collection.

bool Overlaps(IEnumerable<T> other)

Determines whether the current immutable set overlaps with the specified collection.

IImmutableSet<T> Remove(T value)

Removes the specified element from this immutable set.

bool SetEquals(IEnumerable<T> other)

Determines whether the current immutable set and the specified collection contain the same elements.

Creates an immutable set that contains only elements that are present either in the current set or in the specified collection, but not both.

bool TryGetValue(T equalValue, out T actualValue)

Determines whether the set contains a specified value.

Creates a new immutable set that contains all elements that are present in either the current set or in the specified collection.