Table 1: Some Members of a .NET Stack Object

Member Signature

What It Does

Contains(obj)

Returns true if obj is in the stack

Peek()

Gives you the top item on the stack without removing it

Pop()

Removes the top item on the stack and gives it to you

Push(obj)

Puts obj on top of the stack

ToArray()

Copies the stack elements to an array and returns it to you

Count

The count of items currently on the stack