Name

Queue.Peek Method

Class

System.Collections.Queue

Syntax

queuevariable.Peek(  )

Return Value

Object

Description

Returns the first item in the queue as an Object, but does not remove it from the queue

Programming Tips and Gotchas

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

Get VB .NET Language in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.