Imports System.Collections Module Module2 Sub Main() Dim intQueue As Queue = New Queue() Dim i As Integer 'Populate the Queue For i = 0 To 4 intQueue.Enqueue((i + 1) * 10) Next i Console.WriteLine("Here are the items in the Queue: ") 'Print each member of the Queue For Each j As Integer In intQueue Console.Write("{0} ", j.ToString()) Next j 'Displays the first member of the Queue without removing it Console.Write(vbCrLf + "The value of the first member is: {0}" + vbCrLf, intQueue.Peek().ToString()) 'Removes the first item from the Queue and displays the remaining items intQueue.Dequeue() Console.Write("The first item has now been removed." + vbCrLf + "Now the remaining members are: ") 'Print each member of the Queue For Each j As Integer In intQueue Console.Write("{0} ", j.ToString()) Next j System.Console.ReadKey() End Sub End Module