GetEnumerator Method

ConcurrentDictionary<TKey, TValue>.GetEnumerator Method ()

.NET Framework (current version)
 

Returns an enumerator that iterates through the ConcurrentDictionary<TKey, TValue>.

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

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

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 GetEnumerator was called.

Universal Windows Platform
Available since 8
.NET Framework
Available since 4.0
Portable Class Library
Supported in: portable .NET platforms
Windows Phone
Available since 8.1
Return to top
Show:
© 2016 Microsoft