ConcurrentBag<T>.IEnumerable.GetEnumerator 方法

定义

返回循环访问 ConcurrentBag<T> 的枚举器。Returns an enumerator that iterates through the ConcurrentBag<T>.

 virtual System::Collections::IEnumerator ^ System.Collections.IEnumerable.GetEnumerator() = System::Collections::IEnumerable::GetEnumerator;
System.Collections.IEnumerator IEnumerable.GetEnumerator ();
Function GetEnumerator () As IEnumerator Implements IEnumerable.GetEnumerator

返回

ConcurrentBag<T> 的内容的枚举器。An enumerator for the contents of the ConcurrentBag<T>.

实现

注解

枚举的项表示包内容的时间点快照。The items enumerated represent a moment-in-time snapshot of the contents of the bag. 它不会反映调用 GetEnumerator 后对集合的任何更新。It does not reflect any update to the collection after GetEnumerator was called.

适用于