Share via


AsyncQueue<T>.TryPeek(T) Method

Definition

Gets the value at the head of the queue without removing it from the queue, if it is non-empty.

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

Parameters

value
T

Receives the value at the head of the queue; or the default value for the element type if the queue is empty.

Returns

true if the queue was non-empty; false otherwise.

Applies to