Changes

Visual Basic Arrays

371 bytes added, 19:39, 3 August 2007
Sorting a Visual Basic Array
Array.Reverse(strColors)
</pre>
 
== Searching for Array Elements ==
 
Visual Basic provides a mechanism finding elements in an array. The ''Array.BinarySearch()'' function searches the specified array for a matching element and returns the index of the matching element:
 
<pre>
Dim strColors() = {"Red", "Green", "Blue"}
Dim intMatchIndex As Integer
 
intMatchIndex = Array.BinarySearch(strColors)
</pre>