34,333
edits
Changes
→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>