Imports System
Imports System.Collections.Generic
Module Example
Sub Main
Dim numbers As New Queue(Of String)
numbers.Enqueue("one")
numbers.Enqueue("two")
numbers.Enqueue("three")
numbers.Enqueue("four")
numbers.Enqueue("five")
' A queue can be enumerated without disturbing its contents.
For Each number As String In numbers
Console.WriteLine(number)
Next
End Sub
End Module
|