ImmutableList<T>.GetEnumerator Method
Definition
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 list.
public:
virtual System::Collections::Immutable::ImmutableList<T>::Enumerator GetEnumerator();
public:
System::Collections::Immutable::ImmutableList<T>::Enumerator GetEnumerator();
public System.Collections.Immutable.ImmutableList<T>.Enumerator GetEnumerator ();
abstract member GetEnumerator : unit -> System.Collections.Immutable.ImmutableList<'T>.Enumerator
override this.GetEnumerator : unit -> System.Collections.Immutable.ImmutableList<'T>.Enumerator
member this.GetEnumerator : unit -> System.Collections.Immutable.ImmutableList<'T>.Enumerator
Public Function GetEnumerator () As ImmutableList(Of T).Enumerator
Returns
An enumerator that can be used to iterate through the immutable list.
Remarks
Caution
When this enumerator is used 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 or exceptions.
Applies to
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기