ConcurrentStack<T>.TryPop(T) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
嘗試彈跳並將物件放回頂部 ConcurrentStack<T>。
public:
bool TryPop([Runtime::InteropServices::Out] T % result);
public bool TryPop(out T result);
member this.TryPop : 'T -> bool
Public Function TryPop (ByRef result As T) As Boolean
參數
- result
- T
當此方法回傳時,若操作成功,則包含 result 被移除的物件。 若無物件可移除,該值未指定。
傳回
true 若元素被移除並成功從頂 ConcurrentStack<T> 端返回;否則, false。
備註
如需程式碼範例,請參閱ConcurrentStack<T>。