ClassSystem.Collections.Stack (standard version) System.Collections.Generic.Stack (generic version) SyntaxDim result As Object = stackVariable.Peek( ) DescriptionThe Peek method returns the top item on the stack as an Object, but does not remove it from the stack. Usage at a GlanceThe Peek method is similar to the Stack object's Pop method, except that it leaves the stack intact. Version DifferencesVisual Basic 2005 adds support for generics to stacks, as discussed in Chapter 10. See AlsoStack Class, Stack.Pop Method |