Redigera

Dela via


ImmutableStack<T>.Peek Method

Definition

Returns the object at the top of the stack without removing it.

public:
 virtual T Peek();
public T Peek ();
abstract member Peek : unit -> 'T
override this.Peek : unit -> 'T
Public Function Peek () As T

Returns

T

The object at the top of the stack.

Implements

Exceptions

The stack is empty.

Applies to