ConcurrentDictionary<TKey,TValue>.GetEnumerator Método

Definição

Retorna um enumerador que itera por meio de 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))

Retornos

IEnumerator<KeyValuePair<TKey,TValue>>

Um enumerador para o ConcurrentDictionary<TKey,TValue>.

Implementações

Comentários

O enumerador retornado do dicionário é seguro para usar simultaneamente com leituras e gravações no dicionário, no entanto, ele não representa um instantâneo momentâneo do dicionário. O conteúdo exposto por meio do enumerador pode conter modificações feitas no dicionário depois GetEnumerator que foi chamado.

Aplica-se a

Confira também