Struct EmptySet<T>
public struct EmptySet<T> : IReadOnlySet<T>, IReadOnlyCollection<T>, IEnumerable<T>, IEnumerable, IEnumerator<T>, IEnumerator, IDisposable
Type Parameters
T
- Implements
-
IReadOnlySet<T>IEnumerable<T>IEnumerator<T>
- 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
itemTThe item to check if the set contains.
Returns
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
otherIEnumerable<T>The collection to compare to the current set.
Returns
Exceptions
- ArgumentNullException
otheris 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
otherIEnumerable<T>The collection to compare to the current set.
Returns
Exceptions
- ArgumentNullException
otheris null.
IsSubsetOf(IEnumerable<T>)
Determine whether the current set is a subset of a specified collection.
public bool IsSubsetOf(IEnumerable<T> other)
Parameters
otherIEnumerable<T>The collection to compare to the current set.
Returns
Exceptions
- ArgumentNullException
otheris null.
IsSupersetOf(IEnumerable<T>)
Determine whether the current set is a super set of a specified collection.
public bool IsSupersetOf(IEnumerable<T> other)
Parameters
otherIEnumerable<T>The collection to compare to the current set.
Returns
Exceptions
- ArgumentNullException
otheris 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
otherIEnumerable<T>The collection to compare to the current set.
Returns
Exceptions
- ArgumentNullException
otheris 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
otherIEnumerable<T>The collection to compare to the current set.
Returns
Exceptions
- ArgumentNullException
otheris null.