' Visual Basic 2008 9.0 .NET Examples - Introduction to Arrays - Arrays : Module Exercise5Solution Sub Main() Dim count As Integer = 10 Dim upperbound As Integer = count - 1 Dim values(upperbound) As Integer Dim index As Integer ' For index = 0 To upperbound values(index) = index + 1 Next ' For index = 0 To upperbound Console.WriteLine("element " & (index + 1) & _ " ( index " & index & " ) : " & _ values(index)) Next Console.WriteLine() ' Dim backup As Integer = values(0) For index = 0 To (upperbound - 1) values(index) = values(index + 1) Next values(upperbound) = backup ' For index = 0 To upperbound Console.WriteLine("element " & (index + 1) & _ " ( index " & index & " ) : " & _ values(index)) Next ' Console.ReadLine() End Sub End Module ' Visit www.studyvb.com for more examples. Copyright 2003-2008 De Wolf.