Try this:
Dim Lst As New List(Of Array)
Lst.Add({12, 100, 58})
Lst.Add({25, 47, 23})
Lst.Add({15, 19, 203})
Dim arrIndex As Integer = -1
Dim i As Integer = 0
For Each arr As Integer() In Lst
If arr.Contains(47) Then
arrIndex = i
Exit For
End If
i += 1
Next
Console.WriteLine(arrIndex)
This will print
1
. If you search for an integer that doesn't exist, it will print
-1
How this works: you iterate over each array in the
List
, and if that array contains
47
, the
arrIndex
variable will be set to the index of the array in the list.