Szerkesztés

Megosztás a következőn keresztül:


BlockingCollection<T>.IEnumerable<T>.GetEnumerator Method

Definition

Provides an IEnumerator<T> for items in the collection.

 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

Returns

An IEnumerator<T> for the items in the collection.

Implements

Exceptions

Remarks

Unlike GetConsumingEnumerable, BlockingCollection<T>.IEnumerable<T>.GetEnumerator returns a standard enumerator that does not modify the underlying collection. If other threads are adding or removing elements concurrently when GetEnumerator is called, then the elements returned by the enumerator might not represent the current state of the collection.

Applies to

See also