Class EmptySet<T>
Represents an empty set — a set that contains no elements.
public sealed class EmptySet<T> : INonEnumerableSet<T>
Type Parameters
TThe type of elements the set could (but does not) contain.
- Inheritance
-
EmptySet<T>
- Implements
- Inherited Members
Remarks
This type always returns false from Contains(T). It is a useful identity for
set composition and for scenarios like default hit test areas or disabled regions.
Fields
Instance
A shared singleton instance of the empty set.
public static readonly EmptySet<T> Instance
Field Value
- EmptySet<T>
Methods
Contains(T)
Always returns false, since no element belongs to the empty set.
public bool Contains(T obj)
Parameters
objTThe object to test.
Returns
- bool
falsefor all inputs.