ImmutableList<T>.Enumerator 結構

定義

列舉二進位樹狀目錄的內容。

NuGet 套件System.Collections.Immutable (關於固定集合及其安裝方法)

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)

類型參數

T
繼承
ImmutableList<T>.Enumerator
實作

備註

此結構應該與其他兩個二進位樹狀目錄列舉值保持同步: System.Collections.Immutable.ImmutableSortedDictionary<TKey,TValue>.EnumeratorSystem.Collections.Immutable.ImmutableSortedSet<T>.Enumerator

警告

當這個列舉值型別當做實值型別 (,也就是當它不是 boxed) 時,請勿將它指派給第二個變數或將它傳遞給另一個方法來複製它。 處置此列舉值時,它會將可變動的參考型別堆棧傳回資源集區,而且如果實值類型列舉值被複製 (如果您將值傳遞至) ,可能會有一個風險,因為其中一個列舉值複本可能仍然正在使用中。 導致數據損毀或例外狀況。

屬性

Current

取得位於目前列舉值位置的項目。

方法

Dispose()

ImmutableList<T>.Enumerator 類別的目前執行個體所使用的資源釋出。

MoveNext()

將列舉往前推至不可變清單的下一個項目。

Reset()

將列舉程式設定為它的初始位置,這是在不可變清單中的第一個項目之前。

明確介面實作

IEnumerator.Current

目前的元素。

適用於

執行緒安全性

此型別具備執行緒安全。