Option Strict On Imports System.Collections Public Class Collect Public Shared Sub Main() Dim sta As New Collection sta.Add("New York", "NY") sta.Add("Michigan", "MI") sta.Add("New Jersey", "NJ") sta.Add("Massachusetts", "MA") For Each stcode As String In sta Console.WriteLine(stcode) Next End Sub End Class
New York Michigan New Jersey Massachusetts