.NET 2
string[] myStrings = GetMyStrings();
string test = \"testValue\";
How can I verify if myStrings
contains test
How about this:
Sub Main
Dim myStrings(4) As String
myStrings(0) = "String 1"
myStrings(1) = "String 2"
myStrings(2) = "testValue"
myStrings(3) = "String 3"
myStrings(4) = "String 4"
Dim test As String = "testValue"
Dim isFound As Boolean = Array.IndexOf(myStrings, test) >= 0
If isFound Then
Console.WriteLine("Found it!")
End If
End Sub
This should work for .Net 2.0 and VB.Net.