ImmutableStack<T>.PeekRef Method

Definition

Gets a read-only reference to the element on the top of the stack.

public:
 T& ^ PeekRef();
public ref readonly T PeekRef ();
member this.PeekRef : unit -> 'T
Public Function PeekRef () As T

Returns

T

A read-only reference to the element on the top of the stack.

Exceptions

Thrown when the stack is empty.

Applies to