Class ObservableHashSet
Last update: 03.07.2024
Class ObservableHashSet
Namespace: VM.Collections
Assembly: VM.dll
Represents an observable set of values.
public sealed class ObservableHashSet<T> : HashSet<T>
Type Parameters
T
The type of elements in the hash set.
Inheritance
object ← HashSet<T> ← ObservableHashSet<T>
Constructors
ObservableHashSet()
public ObservableHashSet()
ObservableHashSet(IEnumerable<T>)
public ObservableHashSet(IEnumerable<T> collection)
Parameters
collection
IEnumerable<T>
ObservableHashSet(IEqualityComparer<T>)
public ObservableHashSet(IEqualityComparer<T> comparer)
Parameters
comparer
IEqualityComparer<T>
ObservableHashSet(IEnumerable<T>, IEqualityComparer<T>)
public ObservableHashSet(IEnumerable<T> collection, IEqualityComparer<T> comparer)
Parameters
collection
IEnumerable<T>
comparer
IEqualityComparer<T>
Methods
Add(T)
Adds the specified element to a set.
public bool Add(T item)
Parameters
item
T
The element to add to the set.
Returns
true if the element is added to the
Clear()
Removes all elements from a
public void Clear()
Dispose()
public void Dispose()
ExceptWith(IEnumerable<T>)
Removes all elements in the specified collection from the current
public void ExceptWith(IEnumerable<T> other)
Parameters
other
IEnumerable<T>
The collection of items to remove from the
IntersectWith(IEnumerable<T>)
Modifies the current
public void IntersectWith(IEnumerable<T> other)
Parameters
other
IEnumerable<T>
The collection to compare to the current
Remove(T)
Removes the specified element from a
public bool Remove(T item)
Parameters
item
T
The element to remove.
Returns
true if the element is successfully found and removed; otherwise, false. This method returns false if item is not found in the
Reset()
public void Reset()
SymmetricExceptWith(IEnumerable<T>)
Modifies the current
public void SymmetricExceptWith(IEnumerable<T> other)
Parameters
other
IEnumerable<T>
The collection to compare to the current
UnionWith(IEnumerable<T>)
Modifies the current
public void UnionWith(IEnumerable<T> other)
Parameters
other
IEnumerable<T>
The collection to compare to the current
CollectionChanged
public event NotifyCollectionChangedEventHandler CollectionChanged