keypress - C# check for Vowel -


this question has answer here:

i want check if user input vowel. if other key pressed, error should shown. here's have far. how can add other keys? current output: "key pressed" a

static void main(string[] args)     {         consolekeyinfo a;         while (true)         {             = console.readkey();             if (a.key == consolekey.a);             {                console.writeline("a");              }         }     } 

you can try this:

 protected override bool processcmdkey(ref message msg, keys keydata)             {                 if (keydata == keys.f3)                 {                     //do something;                 }                 if(keydata ==keys.escape)                 {                     //do something;                 }                 if(keydata ==keys.f2)                 {                     //do something;                 }                 return false;             } 

Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

javascript - Using Windows Media Player as video fallback for video tag -

c# - Unity IoC Lifetime per HttpRequest for UserStore -