Stack.Pop Method


Stack.Pop Method

Class

System.Collections.Stack (standard version)

System.Collections.Generic.Stack (generic version)

Syntax

     Dim result As Object = stackVariable.Pop(  ) 

Description

The Pop method removes the top item from the stack and returns it as an Object.

Usage at a Glance

Pop generates an error if applied to an empty stack. Use the Count property to check for items on the stack.

Version Differences

Visual Basic 2005 adds support for generics to stacks, as discussed in Chapter 10.

See Also

Stack Class, Stack.Peek Method




Visual Basic 2005(c) In a Nutshell
Visual Basic 2005 in a Nutshell (In a Nutshell (OReilly))
ISBN: 059610152X
EAN: 2147483647
Year: 2004
Pages: 712

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net