<PackageReference Include="System.Runtime" Version="4.0.21-beta-23409" />

ISet<T>

public interface ISet<T> : ICollection<T>, IEnumerable<T>, IEnumerable
Provides the base interface for the abstraction of sets.
bool Add(T item)

Adds an element to the current set and returns a value to indicate if the element was successfully added.

void ExceptWith(IEnumerable<T> other)

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

void IntersectWith(IEnumerable<T> other)

Modifies the current set so that it contains only elements that are also in a specified collection.

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

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

bool IsSubsetOf(IEnumerable<T> other)

Determines whether a set is a subset of a specified collection.

bool IsSupersetOf(IEnumerable<T> other)

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

bool Overlaps(IEnumerable<T> other)

Determines whether the current set overlaps with the specified collection.

bool SetEquals(IEnumerable<T> other)

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

Modifies the current set so that it contains only elements that are present either in the current set or in the specified collection, but not both.

void UnionWith(IEnumerable<T> other)

Modifies the current set so that it contains all elements that are present in the current set, in the specified collection, or in both.