System.Collections.Immutable.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)
namespace System.Collections.Immutable
{
public interface IImmutableSet<[Nullable(2)] T> : IReadOnlyCollection<T>, IEnumerable<T>, IEnumerable
{
IImmutableSet<T> Clear();
bool Contains(T value);
IImmutableSet<T> Add(T value);
IImmutableSet<T> Remove(T value);
bool TryGetValue(T equalValue, out T actualValue);
IImmutableSet<T> Intersect(IEnumerable<T> other);
IImmutableSet<T> Except(IEnumerable<T> other);
IImmutableSet<T> SymmetricExcept(IEnumerable<T> other);
IImmutableSet<T> Union(IEnumerable<T> other);
bool SetEquals(IEnumerable<T> other);
bool IsProperSubsetOf(IEnumerable<T> other);
bool IsProperSupersetOf(IEnumerable<T> other);
bool IsSubsetOf(IEnumerable<T> other);
bool IsSupersetOf(IEnumerable<T> other);
bool Overlaps(IEnumerable<T> other);
}
}