// Initialising String
String gfg = new String("Welcome to geeksforgeeks");
System.out.print("Found g first at position : ");
// Initial index of 'g' will print
// prints 11
System.out.println(gfg.indexOf('g'));
// applies to C#
string S = "Any String At All"
int Sindex = S.indexOf("A") // accepts string or char arguments.
// "Sindex" would be equal to "0", as the indexOf(); meathod returns
// the index position of the first occurance of the specified argument.