Module Example
Public Sub Main()
Dim s1 As String = "A"
Dim s2 As String = "a"
FindInString(s1, "aa", StringComparison.CurrentCulture)
FindInString(s1, "AA", StringComparison.Ordinal)
End Sub
Private Sub FindInString(s As String, substring As String, options As StringComparison)
Dim result As Integer = s.IndexOf(substring, options)
If result <> -1
Console.WriteLine("'{0}' found in {1} at position {2}", substring, s, result)
Else
Console.WriteLine("'{0}' not found in {1}", substring, s)
End If
End Sub
End Module