home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic .NET - Read Less - Learn More
/
Visual_Basic.NET_Read_Less_Learn_More_Richard_Bowman_Visual_2002.iso
/
Resources
/
Code
/
Ch4-WorkWithArrays
/
Module1.vb
< prev
Wrap
Text File
|
2001-07-12
|
478b
|
20 lines
Module Module1
Sub Main()
Dim myArray() As String = {"Joe", "Sam", "Megan"}
Array.Sort(myArray)
Dim name As String
For Each name In myArray
Console.WriteLine(name)
Next
Dim index As Integer
index = Array.BinarySearch(myArray, "Megan")
Console.WriteLine("Item found at position " & index)
Console.ReadLine() ' wait for user to press Enter
End Sub
End Module