System.Collections.Concurrent.ConcurrentDictionary<TKey,TValue>.GetEnumerator Method

Returns an enumerator that iterates through the System.Collections.Concurrent.ConcurrentDictionary`2.

Syntax

public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator ()

Returns

An enumerator for the System.Collections.Concurrent.ConcurrentDictionary`2.

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. The contents exposed through the enumerator may contain modifications made to the dictionary after ConcurrentDictionary`2.GetEnumerator was called.

Requirements

Namespace: System.Collections.Concurrent
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 4.0.0.0