ImmutableDictionary<TKey,TValue>.Enumerator 结构

定义

枚举不可变字典的内容,而无需分配任何内存。

NuGet package: System.Collections.Immutable关于不可变集合和安装方法

C#
public struct ImmutableDictionary<TKey,TValue>.Enumerator : System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<TKey,TValue>>

类型参数

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

属性

Current

获取枚举数当前位置的元素。

方法

Dispose()

释放 ImmutableDictionary<TKey,TValue>.Enumerator 类的当前实例使用的资源。

MoveNext()

将枚举器推进到不可变字典的下一个元素。

Reset()

将枚举器设置到其初始位置,该位置位于字典中的第一个元素之前。

显式接口实现

IEnumerator.Current

获取当前元素。

适用于

产品 版本
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10
.NET Standard 2.0 (package-provided)
UWP 10.0

线程安全性

此类型是线程安全的。