I am trying to declare a constant char to hold a key and a constant string to hold a message telling the user to press the key:
...
private const KEY = 'r';
private const string MSG = "Press " + KEY + " to restart.";
...
I need to explicitly cast the key char to a string since the implicit cast is done during runtime. However, I can't figure out the way to cast a character to a string at compile time. I've seen ToString () on the internet, but it's performed at runtime and therefore doesn't work. I have the key char as a separate variable because it is used several times in the program. Does anybody know how to statically cast a char to a string?