Queue.Peek Method


Queue.Peek Method

Class

System.Collections.Queue (standard version)

System.Collections.Generic.Queue (generic version)

Syntax

     Dim result As Object = queueVariable.Peek(  ) 

Description

The Peek method returns the beginning item in the queue as an Object, but it does not remove it from the queue.

Usage at a Glance

The Peek method is similar to the Queue object's Dequeue method, except that it leaves the queue intact.

Version Differences

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

See Also

Queue Class, Queue.Dequeue 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