Export (0) Print
Expand All

ConcurrentQueue(Of T).GetEnumerator Method

.NET Framework 4.6 and 4.5

Returns an enumerator that iterates through the ConcurrentQueue(Of T).

Namespace:  System.Collections.Concurrent
Assemblies:   mscorlib (in mscorlib.dll)
  System.Collections.Concurrent (in System.Collections.Concurrent.dll)

'Declaration
Public Function GetEnumerator As IEnumerator(Of T)

Return Value

Type: System.Collections.Generic.IEnumerator(Of T)
An enumerator for the contents of the ConcurrentQueue(Of T).

Implements

IEnumerable(Of T).GetEnumerator

The enumeration represents a moment-in-time snapshot of the contents of the queue. It does not reflect any updates to the collection after GetEnumerator was called. The enumerator is safe to use concurrently with reads from and writes to the queue.

The enumerator returns the collection elements in the order in which they were added, which is FIFO order (first-in, first-out).

.NET Framework

Supported in: 4.6, 4.5, 4

.NET Framework Client Profile

Supported in: 4

Portable Class Library

Supported in: Portable Class Library

Supported in: Windows Phone 8.1
Show:
© 2015 Microsoft