ConcurrentStack<T>.TryPop(T) ConcurrentStack<T>.TryPop(T) ConcurrentStack<T>.TryPop(T) ConcurrentStack<T>.TryPop(T) Method

Definition

Attempts to pop and return the object at the top of the ConcurrentStack<T>.

public:
 bool TryPop([Runtime::InteropServices::Out] T % result);
public bool TryPop (out T result);
member this.TryPop :  -> bool
Public Function TryPop (ByRef result As T) As Boolean

Parameters

result
T T T T

When this method returns, if the operation was successful, result contains the object removed. If no object was available to be removed, the value is unspecified.

Returns

true if an element was removed and returned from the top of the ConcurrentStack<T> successfully; otherwise, false.

Remarks

For a code example, see ConcurrentStack<T>.

Applies to