ConcurrentStack<T>.IEnumerable.GetEnumerator 方法

定义

返回循环访问集合的枚举数。Returns an enumerator that iterates through a collection.

 virtual System::Collections::IEnumerator ^ System.Collections.IEnumerable.GetEnumerator() = System::Collections::IEnumerable::GetEnumerator;
System.Collections.IEnumerator IEnumerable.GetEnumerator ();
abstract member System.Collections.IEnumerable.GetEnumerator : unit -> System.Collections.IEnumerator
override this.System.Collections.IEnumerable.GetEnumerator : unit -> System.Collections.IEnumerator
Function GetEnumerator () As IEnumerator Implements IEnumerable.GetEnumerator

返回

IEnumerator

可用于循环访问集合的 IEnumeratorAn IEnumerator that can be used to iterate through the collection.

实现

注解

枚举表示堆栈内容的时间点快照。The enumeration represents a moment-in-time snapshot of the contents of the stack. 它不会反映调用后对集合的任何更新 GetEnumeratorIt 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.

适用于