AsyncQueue<T>.TryPeek Method

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

Namespace:  Microsoft.VisualStudio.Threading
Assembly:  Microsoft.VisualStudio.Threading (in Microsoft.VisualStudio.Threading.dll)

Syntax

'Declaration
Public Function TryPeek ( _
    <OutAttribute> ByRef value As T _
) As Boolean
public bool TryPeek(
    out T value
)
public:
bool TryPeek(
    [OutAttribute] T% value
)
member TryPeek : 
        value:'T byref -> bool
public function TryPeek(
    value : T
) : boolean

Parameters

  • value
    Type: T%

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

Return Value

Type: System.Boolean
true if the queue was non-empty, otherwisefalse.

.NET Framework Security

See Also

Reference

AsyncQueue<T> Class

Microsoft.VisualStudio.Threading Namespace