The ISet type exposes the following members.

Methods

  NameDescription
Public methodAdd
Adds the specified element to this set if it is not already present.
Public methodAddAll
Adds all the elements in the specified collection to the set if they are not already present.
Public methodClear
Removes all objects from the set.
Public methodClone
Creates a new object that is a copy of the current instance.
(Inherited from ICloneable.)
Public methodContains
Returns trueTruetruetrue (True in Visual Basic) if this set contains the specified element.
Public methodContainsAll
Returns trueTruetruetrue (True in Visual Basic) if the set contains all the elements in the specified collection.
Public methodCopyTo
Copies the elements of the ICollection to an Array, starting at a particular Array index.
(Inherited from ICollection.)
Public methodExclusiveOr
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.
Public methodGetEnumerator
Returns an enumerator that iterates through a collection.
(Inherited from IEnumerable.)
Public methodIntersect
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.
Public methodMinus
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.
Public methodRemove
Removes the specified element from the set.
Public methodRemoveAll
Remove all the specified elements from this set, if they exist in this set.
Public methodRetainAll
Retains only the elements in this set that are contained in the specified collection.
Public methodUnion
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

  NameDescription
Public Extension MethodAny (Defined by EnumerableExtensions.)
Public Extension MethodFirst (Defined by EnumerableExtensions.)
Public Extension MethodFirstOrNull (Defined by EnumerableExtensions.)
Public Extension MethodGetCollectionElementType (Defined by ReflectHelper.)

Properties

  NameDescription
Public propertyCount
Gets the number of elements contained in the ICollection.
(Inherited from ICollection.)
Public propertyIsEmpty
Returns trueTruetruetrue (True in Visual Basic) if this set contains no elements.
Public propertyIsSynchronized
Gets a value indicating whether access to the ICollection is synchronized (thread safe).
(Inherited from ICollection.)
Public propertySyncRoot
Gets an object that can be used to synchronize access to the ICollection.
(Inherited from ICollection.)

See Also