Queue in Visual Basic .NET

Queue is a generic collection in VB.NET
Queue implements the FIFO algorithm. Element added first is removed first
Enqueue() is used to add element to Queue. Look at the following piece of code how we can add element to Queue and how we can iterate the Queue


Now I will run Dequeqe() to remove element from Queue

When you look at the output you can observe that first added element “Sunday” is removed first

You can use CopyTo() to copy the Queue to array