I would like to check, in C#, if a char contains a non-ASCII character. What is the best way to check for special characters such as 志
or Ω
?
ASCII ranges from 0 - 127, so just check for that range:
char c = 'a';//or whatever char you have
bool isAscii = c < 128;