Imports System.Collections
Public Class Enumerate
Public Shared Sub Main()
Dim weights As New Collection
Dim iterator As IEnumerator
weights.Add("ounces", "oz")
weights.Add("pounds", "lbs")
weights.Add("kilograms", "kg")
weights.Add("milligrams", "mg")
iterator = weights.GetEnumerator
Do While iterator.MoveNext
Console.WriteLine(iterator.Current)
Loop
End Sub
End Class
|