ImmutableSortedSet<T>.GetEnumerator Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns an enumerator that iterates through the immutable sorted set.
public:
virtual System::Collections::Immutable::ImmutableSortedSet<T>::Enumerator GetEnumerator();
public:
System::Collections::Immutable::ImmutableSortedSet<T>::Enumerator GetEnumerator();
public System.Collections.Immutable.ImmutableSortedSet<T>.Enumerator GetEnumerator();
abstract member GetEnumerator : unit -> System.Collections.Immutable.ImmutableSortedSet<'T>.Enumerator
override this.GetEnumerator : unit -> System.Collections.Immutable.ImmutableSortedSet<'T>.Enumerator
member this.GetEnumerator : unit -> System.Collections.Immutable.ImmutableSortedSet<'T>.Enumerator
Public Function GetEnumerator () As ImmutableSortedSet(Of T).Enumerator
An enumerator that can be used to iterate through the set.
Caution
When you use this enumerator as a value type (that is, when it isn't boxed), do not copy it by assigning it to a second variable or by passing it to another method. When this enumerator is disposed of, it returns a mutable reference type stack to a resource pool, and if the value type enumerator is copied (which can easily happen unintentionally if you pass the value around), there is a risk that a stack that has already been returned to the resource pool may still be in use by one of the enumerator copies, leading to data corruption and exceptions.
System.Collections.Immutable NuGet package
About immutable collections and how to install
Product | Versions |
---|---|
.NET | Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10 |
.NET Standard | 2.0 (package-provided) |
UWP | 10.0 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: