ConcurrentStack<T>.GetEnumerator 方法

定義

傳回在 ConcurrentStack<T> 中逐一查看的列舉值。

public:
 virtual System::Collections::Generic::IEnumerator<T> ^ GetEnumerator();
public System.Collections.Generic.IEnumerator<T> GetEnumerator ();
abstract member GetEnumerator : unit -> System.Collections.Generic.IEnumerator<'T>
override this.GetEnumerator : unit -> System.Collections.Generic.IEnumerator<'T>
Public Function GetEnumerator () As IEnumerator(Of T)

傳回

ConcurrentStack<T> 的列舉程式。

實作

備註

列舉表示堆棧內容的時時快照集。 在呼叫之後 GetEnumerator ,它不會反映集合的任何更新。 列舉值很安全,可與堆疊的讀取和寫入同時使用。 列舉值會傳回 LIFO 中的專案 (先出) 順序。

適用於

另請參閱