TryPeek(T)
abstract
public abstract bool TryPeek(out T item) Attempts to return the element at the beginning of the queue without removing it.
Parameters
itemT- The element at the beginning of the queue, or the default value of
Twhen the queue is empty.
Returns
true if an element was returned; otherwise, false.