ImmutableDictionary<TKey,TValue>.Enumerator 结构

定义

枚举不可变字典的内容,而无需分配任何内存。Enumerates the contents of the immutable dictionary without allocating any memory.

NuGet 包System.Collections.Immutable关于不可变集合和安装方法NuGet package: System.Collections.Immutable (about immutable collections and how to install)

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

类型参数

TKey
TValue
继承
ImmutableDictionary<TKey,TValue>.Enumerator
实现

属性

Current

获取枚举数当前位置的元素。Gets the element at the current position of the enumerator.

方法

Dispose()

释放 ImmutableDictionary<TKey,TValue>.Enumerator 类的当前实例使用的资源。Releases the resources used by the current instance of the ImmutableDictionary<TKey,TValue>.Enumerator class.

MoveNext()

将枚举器推进到不可变字典的下一个元素。Advances the enumerator to the next element of the immutable dictionary.

Reset()

将枚举器设置到其初始位置,该位置位于字典中的第一个元素之前。Sets the enumerator to its initial position, which is before the first element in the dictionary.

显式界面实现

IEnumerator.Current

获取当前元素。Gets the current element.

适用于

线程安全性

此类型是线程安全的。This type is thread safe.