Uredi

Deli z drugimi prek


ConcurrentDictionary<TKey,TValue>.GetEnumerator Method

Definition

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

public:
 virtual System::Collections::Generic::IEnumerator<System::Collections::Generic::KeyValuePair<TKey, TValue>> ^ GetEnumerator();
public System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<TKey,TValue>> GetEnumerator ();
abstract member GetEnumerator : unit -> System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<'Key, 'Value>>
override this.GetEnumerator : unit -> System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<'Key, 'Value>>
Public Function GetEnumerator () As IEnumerator(Of KeyValuePair(Of TKey, TValue))
Public Iterator Overridable NotOverridable Function GetEnumerator () As IEnumerator(Of KeyValuePair(Of TKey, TValue))

Returns

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

Applies to

See also