Changes

Visual Basic Arrays

411 bytes added, 16:30, 3 August 2007
no edit summary
<pre>
Dim strColors(5) As String = {"Red", "Green", "Blue", "Indigo", "Violet", "Yellow" }
 
MessageBox.Show(strColors(0))
MessageBox.Show(strColors(1))
</pre>
 
A ''For'' loop can also be used to interate through each element of an array:
 
<pre>
Dim strColors(5) As String = {"Red", "Green", "Blue", "Indigo", "Violet", "Yellow" }
 
For intCount = 0 To 10
MessageBox.Show(strColors(intCount))
Next intCount
</pre>