IStack<T>.TryPeek(T) Method

Attempts to return an element from the top of the stack without removing it.

Namespace: Spring.Collections
public
 function TryPeek(out item: T): Boolean;

Parameters

item
Type: T

The element at the top of the stack if the operation was successful, Default(T) otherwise.

Return Value

Type: Boolean

True if an element was returned from the top of the stack; otherwise, False.