c# get first occurrence in string code example
Example 1: letter at index of string c#
string s = "hello";
char c = s[1];
// now c == 'e'
Example 2: strinng.indexOf c#
int index = String.IndexOf(char x);
int index = String.IndexOf(string x);
string s = "hello";
char c = s[1];
// now c == 'e'
int index = String.IndexOf(char x);
int index = String.IndexOf(string x);