Imports System.Collections Module Module1 Sub Main() Dim intArray As ArrayList = New ArrayList() Dim i As Integer 'Populate the arraylist For i = 0 To 4 intArray.Add((i + 1) * 10) Next i 'Print each member of the ArrayList For Each j As Integer In intArray Console.Write("{0} ", j.ToString()) Next j Console.WriteLine(vbCrLf + "Now the list is reversed ") 'Reverse the order of the items in the list and display them intArray.Reverse() For Each j As Integer In intArray Console.Write("{0} ", j.ToString()) Next j Console.WriteLine(vbCrLf + "Now the order of the list has been sorted ") 'Sort the items in the list and display them intArray.Sort() For Each j As Integer In intArray Console.Write("{0} ", j.ToString()) Next j Console.WriteLine(vbCrLf + "Now the list has been cleared ") 'Clear the items in the list and display them intArray.Clear() If (intArray.Count() = 0) Then Console.WriteLine("There are nolonger any items in this list") End If System.Console.ReadKey() End Sub End Module