The ISet type exposes the following members.
Methods
Name | Description | |
---|---|---|
Add |
Adds the specified element to this set if it is not already present.
| |
AddAll |
Adds all the elements in the specified collection to the set if they are not already present.
| |
Clear |
Removes all objects from the set.
| |
Clone | Creates a new object that is a copy of the current instance. (Inherited from ICloneable.) | |
Contains |
Returns trueTruetruetrue (True in Visual Basic) if this set contains the specified element.
| |
ContainsAll |
Returns trueTruetruetrue (True in Visual Basic) if the set contains all the elements in the specified collection.
| |
CopyTo | (Inherited from ICollection.) | |
ExclusiveOr |
Performs an "exclusive-or" of the two sets, keeping only the elements that
are in one of the sets, but not in both. The original sets are not modified
during this operation. The result set is a Clone() of this set containing
the elements from the exclusive-or operation.
| |
GetEnumerator | Returns an enumerator that iterates through a collection. (Inherited from IEnumerable.) | |
Intersect |
Performs an "intersection" of the two sets, where only the elements
that are present in both sets remain. That is, the element is included if it exists in
both sets. The Intersect() operation does not modify the input sets. It returns
a Clone() of this set with the appropriate elements removed.
| |
Minus |
Performs a "minus" of set b from set a. This returns a set of all
the elements in set a, removing the elements that are also in set b.
The original sets are not modified during this operation. The result set is a Clone()
of this Set containing the elements from the operation.
| |
Remove |
Removes the specified element from the set.
| |
RemoveAll |
Remove all the specified elements from this set, if they exist in this set.
| |
RetainAll |
Retains only the elements in this set that are contained in the specified collection.
| |
Union |
Performs a "union" of the two sets, where all the elements
in both sets are present. That is, the element is included if it is in either a or b.
Neither this set nor the input set are modified during the operation. The return value
is a Clone() of this set with the extra elements added in.
|
Extension Methods
Name | Description | |
---|---|---|
Any | (Defined by EnumerableExtensions.) | |
First | (Defined by EnumerableExtensions.) | |
FirstOrNull | (Defined by EnumerableExtensions.) | |
GetCollectionElementType | (Defined by ReflectHelper.) |
Properties
Name | Description | |
---|---|---|
Count | Gets the number of elements contained in the ICollection. (Inherited from ICollection.) | |
IsEmpty |
Returns trueTruetruetrue (True in Visual Basic) if this set contains no elements.
| |
IsSynchronized | Gets a value indicating whether access to the ICollection is synchronized (thread safe). (Inherited from ICollection.) | |
SyncRoot | Gets an object that can be used to synchronize access to the ICollection. (Inherited from ICollection.) |