example: (e.KeyCode >= Keys.D0) && (e.KeyCode <= Keys.D9)
I'm trying to detect on a keydown event in a textbox that if a numeric key is pressed
(e.KeyCode >= Keys.D0) && (e.KeyCode <= Keys.D9), to display the e.KeyCode as a string into a listbox.
c
example: (e.KeyCode >= Keys.D0) && (e.KeyCode <= Keys.D9)
I'm trying to detect on a keydown event in a textbox that if a numeric key is pressed
(e.KeyCode >= Keys.D0) && (e.KeyCode <= Keys.D9), to display the e.KeyCode as a string into a listbox.
Best Answer
Assuming they are defined sequentially in the
enum
: