You can use .Contains extension.
- First example finds
karen
againstsKaren
because of the comparer - Second example does not as strings are case sensitive.
So it's wise to know if an exact match is needed or not.
Dim findThisName = "Karen"
Dim someArray = New String() {"karen", "bill", "mary"}
Dim test = someArray.Contains(findThisName, StringComparer.OrdinalIgnoreCase)
If test Then
Console.WriteLine($"{findThisName} was found case insensitive")
Else
Console.WriteLine($"{findThisName} was not found case insensitive")
End If
test = someArray.Contains(findThisName)
If test Then
Console.WriteLine($"{findThisName} was found case sensitive")
Else
Console.WriteLine($"{findThisName} was not found case sensitive")
End If