Switch
You can match two cases to the same branch by placing them directly above one another.
switch (x)
{
case 1:
case 2:
// do something
break;
case 3:
// do something else
break;
}
You can match two cases to the same branch by placing them directly above one another.
switch (x)
{
case 1:
case 2:
// do something
break;
case 3:
// do something else
break;
}