TStack<T>.TryExtract(T) Method

Attempts to remove and return the element at the top of the stack without considering ownership.

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

Parameters

item
Type: T

The element that was removed if the operation was successful, Default(T) otherwise.

Return Value

Type: Boolean

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

Implements

IStack<T>.TryExtract(T)