I have to implement the following in a switch
statement:
switch(num)
{
case 4:
// some code ;
break;
case 3:
// some code ;
brea
The only way I could think of (and I really don't recommand it), would be as follows:
int someValue;
switch (Math.Max(someValue, -1))
{
case -1:
// will be executed for everything lower than zero.
break;
case 0:
// will be executed for value 0.
break;
case 1:
// will be executed for value 1.
break;
default:
// will be executed for anything else.
break;
}