IProducerConsumerCollection<T>.TryTake(T) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
嘗試從 中移除並返回 IProducerConsumerCollection<T>物件。
public:
bool TryTake([Runtime::InteropServices::Out] T % item);
public bool TryTake(out T item);
abstract member TryTake : 'T -> bool
Public Function TryTake (ByRef item As T) As Boolean
參數
- item
- T
當此方法回傳時,若物件已被移除且成功返回,則 item 包含被移除的物件。 若無物件可移除,該值未指定。
傳回
true如果物品被移除並成功歸還;否則,。 false