How to get character for a given ascii value
Solution 1:
Do you mean "A" (a string
) or 'A' (a char
)?
int unicode = 65;
char character = (char) unicode;
string text = character.ToString();
Note that I've referred to Unicode rather than ASCII as that's C#'s native character encoding; essentially each char
is a UTF-16 code point.
Solution 2:
string c = Char.ConvertFromUtf32(65);
c will contain "A"