System.Collections.Concurrent.ConcurrentStack<T>.GetEnumerator Method

Returns an enumerator that iterates through the System.Collections.Concurrent.ConcurrentStack`1.

Syntax

public IEnumerator<T> GetEnumerator ()

Returns

An enumerator for the System.Collections.Concurrent.ConcurrentStack`1.

Remarks

The enumeration represents a moment-in-time snapshot of the contents of the stack. It does not reflect any updates to the collection after ConcurrentStack`1.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.

Requirements

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