Set<T> Class

A generic Set type. Methods: Add, Remove, Contains and Clear.
Public Class Set(Of  _ 
T
Implements IEnumerable(Of T)
This language is not supported or no code example is available.
public class Set<T> : IEnumerable<T>
This language is not supported or no code example is available.
generic<typename T> 
public ref class Set : public IEnumerable<T^>^
This language is not supported or no code example is available.
JScript does not support generic types and methods.
This language is not supported or no code example is available.

Type Parameters

T

Name Description
Public constructor Set() Create a new empty set.
Public constructor Set(IEnumerable<T>) Create a new set from an enumerable object.
Public constructor Set(params T[]) Create a set using the supplied elements.
Top
Name Description
Public property Any Return any element from the set. If the set is empty, an Exception() is thrown. Note that nothing can be assumed about the order in which elements are returned!
Public property Count Returns the number of elements in the set.
Public property Empty
Top
Methods
 
Name Description
Public method Add(T) Add element to set. If already present, does nothing.
Public method AddRange(IEnumerable<T>) Add a range of elements to the set, for example from an array or from a List.
Public method Clear() Clears the set.
Public method Contains(T) Check if the set contains an element.
Public method Equals(object) Determine if two sets are equal, using the obj.Equals() as a comparison operator for each element of the sets.
Public method GetEnumerator()
Public method GetHashCode()
Public method Static Intersect(Set<T>, Set<T>) Create a new set containing the common elements of two given sets.
Public method IntersectWithRange(IEnumerable<T>) Removes elements that are not present in both this set and the given Range. (an intersection operation).
Public method Remove(T) Remove Element element from set, if it exists, else do nothing.
Public method RemoveRange(IEnumerable<T>) Remove a range of elements, eg. from a list or an array.
Public method ToArray() Create an array containing all the elements of the set. The elements are copied, not only referenced.
Public method ToList() Create an array containing all the elements of the set. The elements are copied, not only referenced.
Public method ToString()
Top
IGS.Genamo.Set<T>

.NET Framework

Supported in: 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8

In this article

Definition