IEnumerable.GetEnumerator Method

Task Parallel System.Threading

Returns an enumerator that iterates through the ConcurrentBag<(Of <(T>)>).

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

Syntax

Visual Basic (Declaration)
Private Function GetEnumerator As IEnumerator
	Implements IEnumerable.GetEnumerator
C#
IEnumerator IEnumerable.GetEnumerator()

Return Value

An enumerator for the contents of the ConcurrentBag<(Of <(T>)>).

Implements

IEnumerable..::.GetEnumerator()()()

Remarks

The items enumerated represent a moment-in-time snapshot of the contents of the bag. It does not reflect any update to the collection after GetEnumerator()()() was called.

See Also