Thursday 15 July 2010

c# - Grave accent / tilde console key -


I am currently making a game, and I want to use the grave accent (`) or the tilde (~) key I am a fixed keypage event though I am unable to find the console for this specific character. (I am referring to key rights under the ASC key)

If any, then what is its name?

And if it is not in existence, then what is my own way to make? I tried to do this for my work, although it says an error: error 1 should be continuous expression assigned to 'tilde'

  const ConsoleKey tilde = (Console) Convert. Kochhar ("` ");  

Currently, I am sending such events to my own:

  // Console Quotes Console Key = Console Readkey (true) .kee; // Dispat Event Switches (Key) {// Stop / Resume Case Console. Escape: ToggleSpot (); break; // debug mode // this is where i would like to use `or ~ console key Case ConsoleKey.Spacebar: toggleDebug (); break; }  

convert Tucker ("` `) is not a continuous expression. This is a method call that will be evaluated on runtime. Therefore, the keyword const is not possible here.

string Instead of converting a character to a character, you can use the character directly:

  const console tild = (console) '`';  

However, just casting is not a solution, which I can say. It will return the NumPad0 which will definitely be up to you No damage.

Right Key

  ConsoleKey.Oem3  

No comments:

Post a Comment