ImmutableSortedDictionary<TKey,TValue>.Enumerator 結構

定義

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

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

public: value class ImmutableSortedDictionary<TKey, TValue>::Enumerator : System::Collections::Generic::IEnumerator<System::Collections::Generic::KeyValuePair<TKey, TValue>>
public struct ImmutableSortedDictionary<TKey,TValue>.Enumerator : System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<TKey,TValue>>
type ImmutableSortedDictionary<'Key, 'Value>.Enumerator = struct
    interface IEnumerator<KeyValuePair<'Key, 'Value>>
    interface IEnumerator
    interface IDisposable
Public Structure ImmutableSortedDictionary(Of TKey, TValue).Enumerator
Implements IEnumerator(Of KeyValuePair(Of TKey, TValue))

類型參數

TKey
TValue
繼承
ImmutableSortedDictionary<TKey,TValue>.Enumerator
實作

備註

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

警告

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

屬性

Current

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

方法

Dispose()

ImmutableSortedDictionary<TKey,TValue>.Enumerator 類別的目前執行個體所使用的資源釋出。

MoveNext()

將列舉程式往前推至不可變排序字典的下一個項目。

Reset()

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

明確介面實作

IEnumerator.Current

目前的元素。

適用於

執行緒安全性

此型別具備執行緒安全。