Convert character to its alphabet integer position?
Programming 101:
char c = 'A';
//char c = 'b'; you may use lower case character.
int index = char.ToUpper(c) - 64;//index == 1
For lower and upper case:
int index = (int)c % 32;
Programming 101:
char c = 'A';
//char c = 'b'; you may use lower case character.
int index = char.ToUpper(c) - 64;//index == 1
For lower and upper case:
int index = (int)c % 32;