Skip to main content

ISet<T> Interface

NuGet: GHIElectronics.TinyCLR.Collections
Assembly: GHIElectronics.TinyCLR.Collections
Namespace: System.Collections.Generic

Generic set abstraction. Mirrors the .NET BCL System.Collections.Generic.ISet<T> shape so HashSet<T> and future set implementations interop cleanly with portable BCL-using code.

public interface ISet<T> : ICollection<T>

Methods

Add(T item)

new bool Add(T item)

Adds an element to the set and returns whether it was newly added.

Returns bool

UnionWith(IEnumerable<T> other)

void UnionWith(IEnumerable<T> other)

Modifies the set to contain all elements that are present in itself, the specified collection, or both.

IntersectWith(IEnumerable<T> other)

void IntersectWith(IEnumerable<T> other)

Modifies the set to contain only elements that are also present in the specified collection.

ExceptWith(IEnumerable<T> other)

void ExceptWith(IEnumerable<T> other)

Removes all elements in the specified collection from the set.

SymmetricExceptWith(IEnumerable<T> other)

void SymmetricExceptWith(IEnumerable<T> other)

Modifies the set to contain only elements that are present either in itself or in the specified collection, but not both.

IsSubsetOf(IEnumerable<T> other)

bool IsSubsetOf(IEnumerable<T> other)

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

Returns bool

IsSupersetOf(IEnumerable<T> other)

bool IsSupersetOf(IEnumerable<T> other)

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

Returns bool

IsProperSupersetOf(IEnumerable<T> other)

bool IsProperSupersetOf(IEnumerable<T> other)

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

Returns bool

IsProperSubsetOf(IEnumerable<T> other)

bool IsProperSubsetOf(IEnumerable<T> other)

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

Returns bool

Overlaps(IEnumerable<T> other)

bool Overlaps(IEnumerable<T> other)

Determines whether the set and the specified collection share any common elements.

Returns bool

SetEquals(IEnumerable<T> other)

bool SetEquals(IEnumerable<T> other)

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

Returns bool