Question by
novotd00 · Jan 16, 2017 at 11:54 AM ·
c#stringkeycodeconverting
Convert keycode to string
Hi there,
I am wondering about how to convert KeyCode to string. I need to save certain keys in KeyCode as their string representative in a string array that I will later save as System.IO.File.WriteAllLines(@"whatever");
Just basicly saving some configuration as a controll system and just don't want to copy some random work on internet.
Thx
Comment
Answer by novotd00 · Jan 16, 2017 at 03:35 PM
Nevermind, I found a sollution.
for those who are still wondering like I was:
KeyCode kcode;
string keyCode;
void Convert() {
keyCode = kcode.toString(); //or_.ToString,_not_sure_now...
}
I innitially used .toString(kcode);, which is obviiously wrong. Sorry for spamming you.