In the old switch expression you could have a case do multiple things for example
switch (example)
{
case 1:
doThing1();
doThing2();
break;
case 2:
doThing3();
break;
default: throw new Exception();
}
Is it possible to do something similar in the new switch expression like this
example switch{
1 => doThing1(), doThing2(),
2 => doThing3(),
_ => throw new Exception()
}
or do I have to use the old switch expression?