Implements a Set based on a hash table. This will give the best lookup, add, and remove
performance for very large data-sets, but iteration will occur in no particular order.
The following tables list the members exposed by the HashedSet type.
Public Methods
| Name | Description | |
|---|---|---|
| Add |
Adds the specified element to this set if it is not already present.
(Inherited from DictionarySet.) | |
| AddAll |
Adds all the elements in the specified collection to the set if they are not already present.
(Inherited from DictionarySet.) | |
| Clear |
Removes all objects from the set.
(Inherited from DictionarySet.) | |
| Clone |
Returns a clone of the set instance. This will work for derived set
classes if the derived class implements a constructor that takes no arguments.
(Inherited from Set.) | |
| Contains |
Returns trueTruetrue if this set contains the specified element.
(Inherited from DictionarySet.) | |
| ContainsAll |
Returns trueTruetrue if the set contains all the elements in the specified collection.
(Inherited from DictionarySet.) | |
| CopyTo |
Copies the elements in the Set to an array. The type of array needs
to be compatible with the objects in the Set, obviously.
(Inherited from DictionarySet.) | |
| GetEnumerator |
Gets an enumerator for the elements in the Set.
(Inherited from DictionarySet.) | |
| Remove |
Removes the specified element from the set.
(Inherited from DictionarySet.) | |
| RemoveAll |
Remove all the specified elements from this set, if they exist in this set.
(Inherited from DictionarySet.) | |
| RetainAll |
Retains only the elements in this set that are contained in the specified collection.
(Inherited from DictionarySet.) |
Protected Fields
| Name | Description | |
|---|---|---|
| InternalDictionary |
Provides the storage for elements in the Set, stored as the key-set
of the IDictionary object. Set this object in the constructor
if you create your own Set class.
(Inherited from DictionarySet.) |
Public Constructors
| Name | Description | |
|---|---|---|
| HashedSetNew | Overloaded. |
Public Properties
| Name | Description | |
|---|---|---|
| Count |
The number of elements contained in this collection.
(Inherited from DictionarySet.) | |
| IsEmpty |
Returns trueTruetrue if this set contains no elements.
(Inherited from DictionarySet.) | |
| IsSynchronized |
None of the objects based on DictionarySet are synchronized. Use the
SyncRoot property instead.
(Inherited from DictionarySet.) | |
| SyncRoot |
Returns an object that can be used to synchronize the Set between threads.
(Inherited from DictionarySet.) |
Protected Properties
| Name | Description | |
|---|---|---|
| Placeholder |
The placeholder object used as the value for the IDictionary instance.
(Inherited from DictionarySet.) |