ImmutableHashSet<T> Class

 

Represents an immutable, unordered hash set.

NuGet package: System.Collections.Immutable (about immutable collections and how to install)

Namespace:   System.Collections.Immutable
Assembly:  System.Collections.Immutable (in System.Collections.Immutable.dll)

System::Object
  System.Collections.Immutable::ImmutableHashSet<T>

generic<typename T>
[DebuggerDisplayAttribute("Count = {Count}")]
public ref class ImmutableHashSet sealed : IImmutableSet<T>, 
	IReadOnlyCollection<T>, IEnumerable<T>, IEnumerable, ICollection<T>, 
	ISet<T>, ICollection

Type Parameters

T

The type of elements in the hash set.

NameDescription
System_CAPS_pubpropertyCount

Gets the number of elements in the immutable hash set.

System_CAPS_pubpropertyIsEmpty

Gets a value that indicates whether the current immutable hash set is empty.

System_CAPS_pubpropertyKeyComparer

Gets the object that is used to obtain hash codes for the keys and to check the equality of values in the immutable hash set.

NameDescription
System_CAPS_pubmethodAdd(T)

Adds the specified element to the hash set.

System_CAPS_pubmethodClear()

Retrieves an empty immutable hash set that has the same sorting and ordering semantics as this instance.

System_CAPS_pubmethodContains(T)

Determines whether this immutable hash set contains the specified element.

System_CAPS_pubmethodEquals(Object^)

(Inherited from Object.)

System_CAPS_pubmethodExcept(IEnumerable<T>^)

Removes the elements in the specified collection from the current immutable hash set.

System_CAPS_pubmethodGetEnumerator()

Returns an enumerator that iterates through the collection.

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_pubmethodIntersect(IEnumerable<T>^)

Creates an immutable hash set that contains elements that exist in both this set and the specified set.

System_CAPS_pubmethodIsProperSubsetOf(IEnumerable<T>^)

Determines whether the current immutable hash set is a proper (strict) subset of a specified collection.

System_CAPS_pubmethodIsProperSupersetOf(IEnumerable<T>^)

Determines whether the current immutable hash set is a proper (strict) superset of a specified collection.

System_CAPS_pubmethodIsSubsetOf(IEnumerable<T>^)

Determines whether the current immutable hash set is a subset of a specified collection.

System_CAPS_pubmethodIsSupersetOf(IEnumerable<T>^)

Determines whether the current immutable hash set is a superset of a specified collection.

System_CAPS_pubmethodOverlaps(IEnumerable<T>^)

Determines whether the current immutable hash set overlaps with the specified collection.

System_CAPS_pubmethodRemove(T)

Removes the specified element from this immutable hash set.

System_CAPS_pubmethodSetEquals(IEnumerable<T>^)

Determines whether the current immutable hash set and the specified collection contain the same elements.

System_CAPS_pubmethodSymmetricExcept(IEnumerable<T>^)

Creates an immutable hash set that contains only elements that are present either in the current set or in the specified collection, but not both.

System_CAPS_pubmethodToBuilder()

Creates an immutable hash set that has the same contents as this set and can be efficiently mutated across multiple operations by using standard mutable interfaces.

System_CAPS_pubmethodToString()

(Inherited from Object.)

System_CAPS_pubmethodTryGetValue(T, T%)

Searches the set for a given value and returns the equal value it finds, if any.

System_CAPS_pubmethodUnion(IEnumerable<T>^)

Creates a new immutable hash set that contains all elements that are present in either the current set or in the specified collection.

System_CAPS_pubmethodWithComparer(IEqualityComparer<T>^)

Gets an instance of the immutable hash set that uses the specified equality comparer for its search methods.

NameDescription
System_CAPS_pubfieldSystem_CAPS_staticEmpty

Gets an immutable hash set for this type that uses the default IEqualityComparer<T>.

NameDescription
System_CAPS_pubinterfaceSystem_CAPS_privmethodICollection<T>::Add(T)

Adds an item to the set.

System_CAPS_pubinterfaceSystem_CAPS_privmethodICollection<T>::Clear()

Removes all items from this set.

System_CAPS_pubinterfaceSystem_CAPS_privmethodICollection<T>::CopyTo(array<T>^, Int32)

Copies the elements of the set to an array, starting at a particular index.

System_CAPS_pubinterfaceSystem_CAPS_privmethodICollection<T>::Remove(T)

Removes the first occurrence of a specific object from the set.

System_CAPS_pubinterfaceSystem_CAPS_privmethodIEnumerable<T>::GetEnumerator()

Returns an enumerator that iterates through the collection.

System_CAPS_pubinterfaceSystem_CAPS_privmethodISet<T>::Add(T)

Adds an element to the current set and returns a value that indicates whether the element was successfully added.

System_CAPS_pubinterfaceSystem_CAPS_privmethodISet<T>::ExceptWith(IEnumerable<T>^)

Removes all elements in the specified collection from the current set.

System_CAPS_pubinterfaceSystem_CAPS_privmethodISet<T>::IntersectWith(IEnumerable<T>^)

Modifies the current set so that it contains only elements that are also in a specified collection.

System_CAPS_pubinterfaceSystem_CAPS_privmethodISet<T>::SymmetricExceptWith(IEnumerable<T>^)

Modifies the current set so that it contains only elements that are present either in the current set or in the specified collection, but not both.

System_CAPS_pubinterfaceSystem_CAPS_privmethodISet<T>::UnionWith(IEnumerable<T>^)

Modifies the current set so that it contains all elements that are present in either the current set or in the specified collection.

System_CAPS_pubinterfaceSystem_CAPS_privmethodICollection::CopyTo(Array^, Int32)

Copies the elements of the set to an array, starting at a particular index.

System_CAPS_pubinterfaceSystem_CAPS_privmethodIEnumerable::GetEnumerator()

Returns an enumerator that iterates through a set.

System_CAPS_pubinterfaceSystem_CAPS_privmethodIImmutableSet<T>::Add(T)

Adds the specified element to this immutable set.

System_CAPS_pubinterfaceSystem_CAPS_privmethodIImmutableSet<T>::Clear()

Retrieves an empty set that has the same sorting and ordering semantics as this instance.

System_CAPS_pubinterfaceSystem_CAPS_privmethodIImmutableSet<T>::Except(IEnumerable<T>^)

Removes the elements in the specified collection from the current set.

System_CAPS_pubinterfaceSystem_CAPS_privmethodIImmutableSet<T>::Intersect(IEnumerable<T>^)

Creates an immutable set that contains elements that exist in both this set and the specified set.

System_CAPS_pubinterfaceSystem_CAPS_privmethodIImmutableSet<T>::Remove(T)

Removes the specified element from this immutable set.

System_CAPS_pubinterfaceSystem_CAPS_privmethodIImmutableSet<T>::SymmetricExcept(IEnumerable<T>^)

Creates an immutable set that contains only elements that are present either in the current set or in the specified collection, but not both.

System_CAPS_pubinterfaceSystem_CAPS_privmethodIImmutableSet<T>::Union(IEnumerable<T>^)

Creates a new immutable set that contains all elements that are present in either the current set or in the specified collection.

System_CAPS_pubinterfaceSystem_CAPS_privpropertyICollection<T>::IsReadOnly

See the ICollection<T> interface.

System_CAPS_pubinterfaceSystem_CAPS_privpropertyICollection::IsSynchronized

See the ICollection interface.

System_CAPS_pubinterfaceSystem_CAPS_privpropertyICollection::SyncRoot

NameDescription
System_CAPS_pubmethodToImmutableArray<T>()

Creates an immutable array from the specified collection.(Defined by ImmutableArray.)

System_CAPS_pubmethodToImmutableDictionary<T, TKey>(Func<T, TKey>^)

Overloaded. Constructs an immutable dictionary from an existing collection of elements, applying a transformation function to the source keys.(Defined by ImmutableDictionary.)

System_CAPS_pubmethodToImmutableDictionary<T, TKey>(Func<T, TKey>^, IEqualityComparer<TKey>^)

Overloaded. Constructs an immutable dictionary based on some transformation of a sequence.(Defined by ImmutableDictionary.)

System_CAPS_pubmethodToImmutableDictionary<T, TKey, TValue>(Func<T, TKey>^, Func<T, TValue>^)

Overloaded. Enumerates and transforms a sequence, and produces an immutable dictionary of its contents.(Defined by ImmutableDictionary.)

System_CAPS_pubmethodToImmutableDictionary<T, TKey, TValue>(Func<T, TKey>^, Func<T, TValue>^, IEqualityComparer<TKey>^)

Overloaded. Enumerates and transforms a sequence, and produces an immutable dictionary of its contents by using the specified key comparer.(Defined by ImmutableDictionary.)

System_CAPS_pubmethodToImmutableDictionary<T, TKey, TValue>(Func<T, TKey>^, Func<T, TValue>^, IEqualityComparer<TKey>^, IEqualityComparer<TValue>^)

Overloaded. Enumerates and transforms a sequence, and produces an immutable dictionary of its contents by using the specified key and value comparers.(Defined by ImmutableDictionary.)

System_CAPS_pubmethodToImmutableHashSet<T>()

Overloaded. Enumerates a sequence and produces an immutable hash set of its contents.(Defined by ImmutableHashSet.)

System_CAPS_pubmethodToImmutableHashSet<T>(IEqualityComparer<T>^)

Overloaded. Enumerates a sequence, produces an immutable hash set of its contents, and uses the specified equality comparer for the set type.(Defined by ImmutableHashSet.)

System_CAPS_pubmethodToImmutableList<T>()

Enumerates a sequence and produces an immutable list of its contents.(Defined by ImmutableList.)

System_CAPS_pubmethodToImmutableSortedDictionary<T, TKey, TValue>(Func<T, TKey>^, Func<T, TValue>^)

Overloaded. Enumerates and transforms a sequence, and produces an immutable sorted dictionary of its contents.(Defined by ImmutableSortedDictionary.)

System_CAPS_pubmethodToImmutableSortedDictionary<T, TKey, TValue>(Func<T, TKey>^, Func<T, TValue>^, IComparer<TKey>^)

Overloaded. Enumerates and transforms a sequence, and produces an immutable sorted dictionary of its contents by using the specified key comparer.(Defined by ImmutableSortedDictionary.)

System_CAPS_pubmethodToImmutableSortedDictionary<T, TKey, TValue>(Func<T, TKey>^, Func<T, TValue>^, IComparer<TKey>^, IEqualityComparer<TValue>^)

Overloaded. Enumerates and transforms a sequence, and produces an immutable sorted dictionary of its contents by using the specified key and value comparers.(Defined by ImmutableSortedDictionary.)

System_CAPS_pubmethodToImmutableSortedSet<T>()

Overloaded. Enumerates a sequence and produces an immutable sorted set of its contents.(Defined by ImmutableSortedSet.)

System_CAPS_pubmethodToImmutableSortedSet<T>(IComparer<T>^)

Overloaded. Enumerates a sequence, produces an immutable sorted set of its contents, and uses the specified comparer.(Defined by ImmutableSortedSet.)

This type is thread safe.

Return to top
Show: