Set<(Of <(<'T>)>)> Class
Set<T> is a collection that contains items of type T.
The item are maintained in a haphazard, unpredictable order, and duplicate items are not allowed.
Namespace:
Wintellect.PowerCollections
Assembly:
PowerCollections (in PowerCollections.dll)
Syntax
[SerializableAttribute] public class Set<T> : CollectionBase<T>
<SerializableAttribute> _ Public Class Set(Of T) _ Inherits CollectionBase(Of T)
[SerializableAttribute] generic<typename T> public ref class Set : public CollectionBase<T>
Type Parameters
- T
Remarks
The items are compared in one of two ways. If T implements IComparable<T> then the Equals method of that interface will be used to compare items, otherwise the Equals method from Object will be used. Alternatively, an instance of IComparer<T> can be passed to the constructor to use to compare items.
Set is implemented as a hash table. Inserting, deleting, and looking up an an element all are done in approximately constant time, regardless of the number of items in the Set.
OrderedSet<(Of <(<'T>)>)> is similar, but uses comparison instead of hashing, and does maintains the items in sorted order.
Inheritance Hierarchy
Wintellect.PowerCollections..::..CollectionBase<(Of <(<'T>)>)>
Wintellect.PowerCollections..::..Set<(Of <(<'T>)>)>