stack class : Peek() method
Description
Returns the instance at the top of the stack without removing.
Syntax
stackInstance.Peek()
Arguments
None
Return value
Class | Description |
someClass | The instance of the top of the stack. |
Sample code
//anyStack is a instance of stack{string} type.
string str = anyStack.Peek();
Notes
It's a wrapper of the System.Collections.Generic.Stack<t>.Peek().