ImmutableList<T>.Enumerator ImmutableList<T>.Enumerator ImmutableList<T>.Enumerator ImmutableList<T>.Enumerator Struct


列舉二進位樹狀目錄的內容。Enumerates the contents of a binary tree.

NuGet 套件System.Collections.Immutable (關於固定集合及其安裝方法)NuGet package: System.Collections.Immutable (about immutable collections and how to install)

public: value class ImmutableList<T>::Enumerator : System::Collections::Generic::IEnumerator<T>
public struct ImmutableList<T>.Enumerator : System.Collections.Generic.IEnumerator<T>
type ImmutableList<'T>.Enumerator = struct
    interface IEnumerator<'T>
    interface IEnumerator
    interface IDisposable
Public Structure ImmutableList(Of T).Enumerator
Implements IEnumerator(Of T)




這個結構應該與其他兩個二進位樹狀列舉值保持同步: System.Collections.Immutable.ImmutableSortedDictionary<TKey,TValue>.EnumeratorSystem.Collections.Immutable.ImmutableSortedSet<T>.EnumeratorThis structure should be kept synchronized with the other two binary tree enumerators: System.Collections.Immutable.ImmutableSortedDictionary<TKey,TValue>.Enumerator and System.Collections.Immutable.ImmutableSortedSet<T>.Enumerator.


當此枚舉器當做實值型別使用時 (也就是未加上框時), 請勿將它指派給第二個變數或將它傳遞給另一個方法來複製它。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.


Current Current Current Current

取得位於目前列舉值位置的項目。Gets the element at the current position of the enumerator.


Dispose() Dispose() Dispose() Dispose()

ImmutableList<T>.Enumerator 類別的目前執行個體所使用的資源釋出。Releases the resources used by the current instance of the ImmutableList<T>.Enumerator class.

MoveNext() MoveNext() MoveNext() MoveNext()

將列舉往前推至不可變清單的下一個項目。Advances enumeration to the next element of the immutable list.

Reset() Reset() Reset() Reset()

將列舉程式設定為它的初始位置,這是在不可變清單中的第一個項目之前。Sets the enumerator to its initial position, which is before the first element in the immutable list.


IEnumerator.Current IEnumerator.Current IEnumerator.Current IEnumerator.Current

目前的元素。The current element.



此型別具備執行緒安全。This type is thread safe.