Version

HashSet Class Members

The following tables list the members exposed by HashSet.

Public Constructors
 NameDescription
Public ConstructorHashSet ConstructorOverloaded.   
Public Properties
 NameDescription
Public PropertyCountReturns the number of items contained in the set.  
Public PropertyIsEmptyReturns true if the set is empty, that is it has no elements.  
Public PropertyIsSynchronizedIndicates whether this data structure is synchronized.  
Public PropertySyncRootReturns the object that can be used to synchronize the access to this data structure.  
Public Methods
 NameDescription
Public MethodAddAdds the item to the set. If the item already exists in the set, does nothing.  
Public MethodAddItemsOverloaded. Adds items from the specified set to this set.  
Public Methodstatic (Shared in Visual Basic)AreEqualReturns true if both sets are equal. They have the same items.  
Public MethodClearClears the set.  
Public MethodCopyToCopies all the elements of this set to the spcified array starting at the specified index in the array.  
Public MethodDoesIntersectReturns true of the specified set and this set intersect.  
Public MethodExistsReturns true if the specified item exists in this set.  
Public MethodGetEnumeratorReturns a new enumerator that enumerates all the elements of this set.  
Public MethodGetEquivalentItemReturns the item in the hash that has the equivalent key to the padded in item  
Public Methodstatic (Shared in Visual Basic)GetIntersectionCalculates the intersection of the specified sets.  
Public Methodstatic (Shared in Visual Basic)GetUnionCalculates the union of the specified sets.  
Public MethodIsSubsetOfReturns true if this set is a subset of the specified set.  
Public MethodRemoveRemoves the specified item from the set. If the item doesn't exist in the set does nothing.  
Public MethodToArray<T>Returns an array containing all the elements of this set.  
See Also