ConcurrentDictionary<TKey,TValue>.IEnumerable.GetEnumerator Method

Definition

返回遍历 ConcurrentDictionary<TKey,TValue> 的枚举器。Returns an enumerator that iterates through the ConcurrentDictionary<TKey,TValue>.

 virtual System::Collections::IEnumerator ^ System.Collections.IEnumerable.GetEnumerator() = System::Collections::IEnumerable::GetEnumerator;
System.Collections.IEnumerator IEnumerable.GetEnumerator ();
abstract member System.Collections.IEnumerable.GetEnumerator : unit -> System.Collections.IEnumerator
override this.System.Collections.IEnumerable.GetEnumerator : unit -> System.Collections.IEnumerator
Function GetEnumerator () As IEnumerator Implements IEnumerable.GetEnumerator

Returns

IEnumerator

用于 ConcurrentDictionary<TKey,TValue> 的枚举数。An enumerator for the ConcurrentDictionary<TKey,TValue>.

Implements

Remarks

从字典返回的枚举器可安全地用于字典中的读取和写入,但它并不表示字典的时间点快照。The enumerator returned from the dictionary is safe to use concurrently with reads and writes to the dictionary, however it does not represent a moment-in-time snapshot of the dictionary. 通过枚举器公开的内容可能包含调用 GetEnumerator 后对字典所做的修改。The contents exposed through the enumerator may contain modifications made to the dictionary after GetEnumerator was called.

Applies to

See also