G
Guest
Hi, guys,
I have a switch statement like the follows in a KeyPress event:
switch (e.KeyChar)
{
case '0' - '9':
case 'A' - 'Z':
break;
default:
break;
}
Of course, this did not work. But, how can I do such kind of case values
which are in a range without writing each case value one by one? Thanks a lot.
I have a switch statement like the follows in a KeyPress event:
switch (e.KeyChar)
{
case '0' - '9':
case 'A' - 'Z':
break;
default:
break;
}
Of course, this did not work. But, how can I do such kind of case values
which are in a range without writing each case value one by one? Thanks a lot.