Queue « Data Structure « VB.Net
Windows Presentation Foundation
Queue Demo: enqueue, dequeue and peek
Queue Item Count
Simple Demo for Queue: Enqueue, Dequeue and Peek
Creates a queue of strings with default capacity and uses the Enqueue method to queue five strings.
The elements of the queue are enumerated, which does not change the state of the queue.
The Dequeue method is used to dequeue the first string.
The Peek method is used to look at the next item in the queue
The ToArray method is used to create an array and copy the queue elements to it
the array is passed to the Queue<(Of <(T>)>) constructor that takes IEnumerable<(Of <(T>)>)
CopyTo method is used to copy the array elements beginning at the middle of the array.
Create a second copy of the queue containing three null elements at the beginning.
Queue Class represents a first-in, first-out collection of objects.
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.