I would like to use the String method of IndexOfAny to check if a character exists in the specified string.
Examples I found online using the IndexOfAny method include the "c" after each character in the character array when using VB.NET. However, when I look at examples of simple character arrays in VB.NET, I donβt see such a βcβ after each character. What does "c" do? It's not obligatory?
Dim s1 As String = "Darth is not my father." ' Find the first index of either "x" or "n" Dim i1 As Integer = s1.IndexOfAny(New Char() {"x"c, "n"c})
source share