ImmutableSortedSet<T>::Builder Class
Represents a sorted set that enables changes with little or no memory allocations, and efficiently manipulates or builds immutable sorted sets.
NuGet package: System.Collections.Immutable (about immutable collections and how to install)
Assembly: System.Collections.Immutable (in System.Collections.Immutable.dll)
| Name | Description | |
|---|---|---|
![]() | Count | Gets the number of elements in the immutable sorted set. |
![]() | Item[Int32] | Gets the element of the set at the given index. |
![]() | KeyComparer | Gets or sets the object that is used to determine equality for the values in the immutable sorted set. |
![]() | Max | Gets the maximum value in the immutable sorted set, as defined by the comparer. |
![]() | Min | Gets the minimum value in the immutable sorted set, as defined by the comparer. |
| Name | Description | |
|---|---|---|
![]() | Add(T) | Adds an element to the current set and returns a value to indicate whether the element was successfully added. |
![]() | Clear() | Removes all elements from this set. |
![]() | Contains(T) | Determines whether the set contains the specified object. |
![]() | Equals(Object^) | (Inherited from Object.) |
![]() | ExceptWith(IEnumerable<T>^) | Removes the specified set of items from the current set. |
![]() | GetEnumerator() | Returns an enumerator that iterates through the set. |
![]() | GetHashCode() | (Inherited from Object.) |
![]() | GetType() | (Inherited from Object.) |
![]() | IntersectWith(IEnumerable<T>^) | Modifies the current set so that it contains only elements that are also in a specified collection. |
![]() | IsProperSubsetOf(IEnumerable<T>^) | Determines whether the current set is a proper (strict) subset of a specified collection. |
![]() | IsProperSupersetOf(IEnumerable<T>^) | Determines whether the current set is a proper (strict) superset of a specified collection. |
![]() | IsSubsetOf(IEnumerable<T>^) | Determines whether the current set is a subset of a specified collection. |
![]() | IsSupersetOf(IEnumerable<T>^) | Determines whether the current set is a superset of a specified collection. |
![]() | Overlaps(IEnumerable<T>^) | Determines whether the current set overlaps with the specified collection. |
![]() | Remove(T) | Removes the first occurrence of the specified object from the set. |
![]() | Reverse() | Returns an enumerator that iterates over the immutable sorted set in reverse order. |
![]() | SetEquals(IEnumerable<T>^) | Determines whether the current set and the specified collection contain the same elements. |
![]() | 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. |
![]() | ToImmutable() | Creates an immutable sorted set based on the contents of this instance. |
![]() | ToString() | (Inherited from Object.) |
![]() | UnionWith(IEnumerable<T>^) | Modifies the current set so that it contains all elements that are present in both the current set and in the specified collection. |
| Name | Description | |
|---|---|---|
![]() ![]() | ICollection<T>::Add(T) | Adds an element to the current set and returns a value to indicate whether the element was successfully added. |
![]() ![]() | ICollection<T>::CopyTo(array<T>^, Int32) | Copies the elements of the collection to an array, starting at a particular array index. |
![]() ![]() | IEnumerable<T>::GetEnumerator() | Returns an enumerator that iterates through the collection. |
![]() ![]() | ICollection::CopyTo(Array^, Int32) | Copies the elements of the set to an array, starting at a particular array index. |
![]() ![]() | IEnumerable::GetEnumerator() | Returns an enumerator that iterates through the collection. |
![]() ![]() | ICollection<T>::IsReadOnly | Gets a value indicating whether this instance is read-only. |
![]() ![]() | ICollection::IsSynchronized | Gets a value indicating whether access to the ICollection is synchronized (thread safe). |
![]() ![]() | ICollection::SyncRoot | Gets an object that can be used to synchronize access to the ICollection. |
| Name | Description | |
|---|---|---|
![]() | ToImmutableArray<T>() | Creates an immutable array from the specified collection.(Defined by ImmutableArray.) |
![]() | ToImmutableDictionary<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.) |
![]() | ToImmutableDictionary<T, TKey>(Func<T, TKey>^, IEqualityComparer<TKey>^) | Overloaded. Constructs an immutable dictionary based on some transformation of a sequence.(Defined by ImmutableDictionary.) |
![]() | ToImmutableDictionary<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.) |
![]() | ToImmutableDictionary<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.) |
![]() | ToImmutableDictionary<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.) |
![]() | ToImmutableHashSet<T>() | Overloaded. Enumerates a sequence and produces an immutable hash set of its contents.(Defined by ImmutableHashSet.) |
![]() | ToImmutableHashSet<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.) |
![]() | ToImmutableList<T>() | Enumerates a sequence and produces an immutable list of its contents.(Defined by ImmutableList.) |
![]() | ToImmutableSortedDictionary<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.) |
![]() | ToImmutableSortedDictionary<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.) |
![]() | ToImmutableSortedDictionary<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.) |
![]() | ToImmutableSortedSet<T>() | Overloaded. Enumerates a sequence and produces an immutable sorted set of its contents.(Defined by ImmutableSortedSet.) |
![]() | ToImmutableSortedSet<T>(IComparer<T>^) | Overloaded. Enumerates a sequence, produces an immutable sorted set of its contents, and uses the specified comparer.(Defined by ImmutableSortedSet.) |
Although ImmutableSortedSet<T>::Union and other methods already provide fast bulk change operations on a collection, the ImmutableSortedSet<T>::Builder class enables multiple combinations of changes to be made to a set with equal or greater efficiency, depending on the operation.
Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.




