Changes

Visual Basic Arrays

183 bytes added, 18:51, 3 August 2007
Finding the Size of an Array
Another way to be sure you do not exceed the bounds of a Visual Basic array is to use the UBound() and LBound() functions. These functions return the upper and lower bounds of an array respectively. This is especially useful when using a ''For'' loop to iterate through an array. For example:
 
<pre>
Dim intNumbers(10) As Integer
Dim intCount As Integer
 
For intCount = LBound(intNumbers) To UBound(intNumbers)
MessageBox.Show (intNumbers(intCount))
Next intCount
</pre>
== Changing the Size of a Visual Basic Array ==