How to convert an ASCII value into a character in .NET
.net, ascii, integer
Solution
In C++:
int main(array<System::String ^> ^args)
{
Console::WriteLine(String::Format("You typed '{0}'", Convert::ToChar(65)));
return 0;
}
Problem
There are a million posts on here on how to convert a character to its ASCII value. Well I want the complete opposite. I have an ASCII value stored as an int and I want to display its ASCII character representation in a string. i.e. please display the code to convert the int `65` to `A`. What I have currently is `String::Format("You typed '{0}'", (char)65)` but this results in `"You typed '65'"` whereas I want it to be `"You typed 'A'"` I am using C++/CLI but I guess any .NET language would do... (edited post-humously to improve the question for future googlers)