ConcurrentStack<T>.GetEnumerator Method

Returns an enumerator that iterates through the ConcurrentStack<T>.

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

public IEnumerator<T> GetEnumerator()

Return Value

Type: System.Collections.Generic.IEnumerator<T>
An enumerator for the ConcurrentStack<T>.

Implements

IEnumerable<T>.GetEnumerator()

The enumeration represents a moment-in-time snapshot of the contents of the stack. 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 stack. The enumerator returns items in LIFO (last-in, first-out) order.

.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
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft