HashSet<T> Class
Namespace: System.Collections.Generic · Assembly: GHIElectronics.TinyCLR.Collections
Hash-table-based generic set. Mirrors the .NET BCL surface for the subset we ship. Same chained-collision layout and prime-table sizing as Dictionary{TKey, TValue}; the entry holds the element directly instead of a key/value pair. null IS a valid element when T is a reference type — the comparer (EqualityComparer{T}.Default) treats null consistently (GetHashCode(null) = 0, Equals(null, null) = true).
public class HashSet<T> : ISet<T>, ICollection<T>, IEnumerable<T>, ICollection, IEnumerable
Constructors
HashSet()
public HashSet() : this(0, null)
No description available.
HashSet(IEqualityComparer<T> comparer)
public HashSet(IEqualityComparer<T> comparer) : this(0, comparer)
No description available.
| Parameter | Type | Description |
|---|---|---|
comparer | IEqualityComparer<T> |
HashSet(int capacity)
public HashSet(int capacity) : this(capacity, null)
No description available.
| Parameter | Type | Description |
|---|---|---|
capacity | int |
HashSet(int capacity, IEqualityComparer<T> comparer)
public HashSet(int capacity, IEqualityComparer<T> comparer)
No description available.
| Parameter | Type | Description |
|---|---|---|
capacity | int | |
comparer | IEqualityComparer<T> |
HashSet(IEnumerable<T> collection)
public HashSet(IEnumerable<T> collection) : this(collection, null)
No description available.
| Parameter | Type | Description |
|---|---|---|
collection | IEnumerable<T> |
HashSet(IEnumerable<T> collection, IEqualityComparer<T> comparer)
public HashSet(IEnumerable<T> collection, IEqualityComparer<T> comparer) : this(0, comparer)
No description available.
| Parameter | Type | Description |
|---|---|---|
collection | IEnumerable<T> | |
comparer | IEqualityComparer<T> |
Properties
Comparer
public IEqualityComparer<T> Comparer { get; }
No description available.
Count
public int Count { get; }
Gets the number of elements contained in the array. (inherited)
Methods
Add(T item)
public bool Add(T item)
Appends a UIElement to the end of the UIElementCollection. (inherited)
| Parameter | Type | Description |
|---|---|---|
item | T |
Returns bool — The UIElementCollection index at which the UIElement has been added.
Clear()
public void Clear()
Removes all elements from the UIElementCollection. (inherited)
Contains(T item)
public bool Contains(T item)
Determines whether a element is in the UIElementCollection. (inherited)
| Parameter | Type | Description |
|---|---|---|
item | T |
Returns bool
Remove(T item)
public bool Remove(T item)
Removes the specified element from the UIElementCollection. (inherited)
| Parameter | Type | Description |
|---|---|---|
item | T |
Returns bool
RemoveWhere(Predicate<T> match)
public int RemoveWhere(Predicate<T> match)
No description available.
| Parameter | Type | Description |
|---|---|---|
match | Predicate<T> |
Returns int
TryGetValue(T equalValue, out T actualValue)
public bool TryGetValue(T equalValue, out T actualValue)
No description available.
| Parameter | Type | Description |
|---|---|---|
equalValue | T | |
actualValue | out T |
Returns bool
CopyTo(T[] array)
public void CopyTo(T[] array)
No description available.
| Parameter | Type | Description |
|---|---|---|
array | T[] |
CopyTo(T[] array, int arrayIndex)
public void CopyTo(T[] array, int arrayIndex)
Strongly typed version of CopyTo Copies the collection into the Array. (inherited)
| Parameter | Type | Description |
|---|---|---|
array | T[] | |
arrayIndex | int |
CopyTo(T[] array, int arrayIndex, int count)
public void CopyTo(T[] array, int arrayIndex, int count)
No description available.
| Parameter | Type | Description |
|---|---|---|
array | T[] | |
arrayIndex | int | |
count | int |
UnionWith(IEnumerable<T> other)
public void UnionWith(IEnumerable<T> other)
No description available.
| Parameter | Type | Description |
|---|---|---|
other | IEnumerable<T> |
IntersectWith(IEnumerable<T> other)
public void IntersectWith(IEnumerable<T> other)
No description available.
| Parameter | Type | Description |
|---|---|---|
other | IEnumerable<T> |
ExceptWith(IEnumerable<T> other)
public void ExceptWith(IEnumerable<T> other)
No description available.
| Parameter | Type | Description |
|---|---|---|
other | IEnumerable<T> |
SymmetricExceptWith(IEnumerable<T> other)
public void SymmetricExceptWith(IEnumerable<T> other)
No description available.
| Parameter | Type | Description |
|---|---|---|
other | IEnumerable<T> |
IsSubsetOf(IEnumerable<T> other)
public bool IsSubsetOf(IEnumerable<T> other)
No description available.
| Parameter | Type | Description |
|---|---|---|
other | IEnumerable<T> |
Returns bool
IsProperSubsetOf(IEnumerable<T> other)
public bool IsProperSubsetOf(IEnumerable<T> other)
No description available.
| Parameter | Type | Description |
|---|---|---|
other | IEnumerable<T> |
Returns bool
IsSupersetOf(IEnumerable<T> other)
public bool IsSupersetOf(IEnumerable<T> other)
No description available.
| Parameter | Type | Description |
|---|---|---|
other | IEnumerable<T> |
Returns bool
IsProperSupersetOf(IEnumerable<T> other)
public bool IsProperSupersetOf(IEnumerable<T> other)
No description available.
| Parameter | Type | Description |
|---|---|---|
other | IEnumerable<T> |
Returns bool
Overlaps(IEnumerable<T> other)
public bool Overlaps(IEnumerable<T> other)
No description available.
| Parameter | Type | Description |
|---|---|---|
other | IEnumerable<T> |
Returns bool
SetEquals(IEnumerable<T> other)
public bool SetEquals(IEnumerable<T> other)
No description available.
| Parameter | Type | Description |
|---|---|---|
other | IEnumerable<T> |
Returns bool
GetEnumerator()
public Enumerator GetEnumerator()
No description available.
Returns Enumerator