All three generic overloads of the Array.IndexOf method.
Imports System
Public Class Example
Public Shared Sub Main()
Dim letters() As String = { "A","B","C","F","D","A","E" }
Console.WriteLine()
For Each letter As String In letters
Console.WriteLine(letter)
Next
Console.WriteLine("Array.IndexOf(letters, ""A""): {0}", Array.IndexOf(letters, "A"))
Console.WriteLine("Array.IndexOf(letters, ""A"", 3): {0}",Array.IndexOf(letters, "A", 3))
Console.WriteLine("Array.IndexOf(letters, ""A"", 2, 2): {0}", Array.IndexOf(letters, "A", 2, 2))
End Sub
End Class
Related examples in the same category