BlockingCollection<T>.IEnumerable<T>.GetEnumerator Metodo

Definizione

Fornisce un oggetto IEnumerator<T> per gli elementi nella raccolta.

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

Valori restituiti

Oggetto IEnumerator<T> per gli elementi dell'insieme.

Implementazioni

Eccezioni

L'oggetto BlockingCollection<T> è stato eliminato.

Commenti

A differenza di GetConsumingEnumerable, BlockingCollection<T>.IEnumerable<T>.GetEnumerator restituisce un enumeratore standard che non modifica la raccolta sottostante. Se altri thread aggiungono o rimuovono elementi contemporaneamente quando viene chiamato GetEnumerator, gli elementi restituiti dall'enumeratore potrebbero non rappresentare lo stato corrente della raccolta.

Si applica a

Vedi anche