Imports System
Public Class MainClass
Shared Sub Main()
'Declare an array
Dim strFriends(4) As String
'Populate the array
strFriends(0) = "R"
strFriends(1) = "B"
strFriends(2) = "S"
strFriends(3) = "S"
strFriends(4) = "K"
Array.Sort(strFriends)
'Enumerate the array
For Each strName As String In strFriends
'Add the array item to the list
System.Console.WriteLine(strName)
Next
End Sub
End Class
|