Table of Contents

Struct EmptySet<T>

Namespace
The.Utility
Assembly
Instagile.dll
public struct EmptySet<T> : IReadOnlySet<T>, IReadOnlyCollection<T>, IEnumerable<T>, IEnumerable, IEnumerator<T>, IEnumerator, IDisposable

Type Parameters

T
Implements
Inherited Members

Properties

Count

Gets the number of elements in the collection.

public int Count { get; }

Property Value

int

The number of elements in the collection.

Current

Gets the element in the collection at the current position of the enumerator.

public T Current { get; }

Property Value

T

The element in the collection at the current position of the enumerator.

Methods

Contains(T)

Determines if the set contains a specific item.

public bool Contains(T item)

Parameters

item T

The item to check if the set contains.

Returns

bool

true if found; otherwise false.

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

GetEnumerator()

Returns an enumerator that iterates through the collection.

public IEnumerator<T> GetEnumerator()

Returns

IEnumerator<T>

An enumerator that can be used to iterate through the collection.

IsProperSubsetOf(IEnumerable<T>)

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

public bool IsProperSubsetOf(IEnumerable<T> other)

Parameters

other IEnumerable<T>

The collection to compare to the current set.

Returns

bool

true if the current set is a proper subset of other; otherwise false.

Exceptions

ArgumentNullException

other is null.

IsProperSupersetOf(IEnumerable<T>)

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

public bool IsProperSupersetOf(IEnumerable<T> other)

Parameters

other IEnumerable<T>

The collection to compare to the current set.

Returns

bool

true if the collection is a proper superset of other; otherwise false.

Exceptions

ArgumentNullException

other is null.

IsSubsetOf(IEnumerable<T>)

Determine whether the current set is a subset of a specified collection.

public bool IsSubsetOf(IEnumerable<T> other)

Parameters

other IEnumerable<T>

The collection to compare to the current set.

Returns

bool

true if the current set is a subset of other; otherwise false.

Exceptions

ArgumentNullException

other is null.

IsSupersetOf(IEnumerable<T>)

Determine whether the current set is a super set of a specified collection.

public bool IsSupersetOf(IEnumerable<T> other)

Parameters

other IEnumerable<T>

The collection to compare to the current set.

Returns

bool

true if the current set is a subset of other; otherwise false.

Exceptions

ArgumentNullException

other is null.

MoveNext()

Advances the enumerator to the next element of the collection.

public bool MoveNext()

Returns

bool

true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection.

Exceptions

InvalidOperationException

The collection was modified after the enumerator was created.

Overlaps(IEnumerable<T>)

Determines whether the current set overlaps with the specified collection.

public bool Overlaps(IEnumerable<T> other)

Parameters

other IEnumerable<T>

The collection to compare to the current set.

Returns

bool

trueif the current set and other share at least one common element; otherwise, false.

Exceptions

ArgumentNullException

other is null.

Reset()

Sets the enumerator to its initial position, which is before the first element in the collection.

public void Reset()

Exceptions

InvalidOperationException

The collection was modified after the enumerator was created.

NotSupportedException

The enumerator does not support being reset.

SetEquals(IEnumerable<T>)

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

public bool SetEquals(IEnumerable<T> other)

Parameters

other IEnumerable<T>

The collection to compare to the current set.

Returns

bool

true if the current set is equal to other; otherwise, false.

Exceptions

ArgumentNullException

other is null.