Is there a way that I can execute the same line of code for each "Case" but only have to type it in once instead of having the same code specified for all Cases ?
switch (SomeTest)
{
case "test1":
{
// Do something for test 1
break;
}
case "test2":
{
// Do something for test 2
break;
}
case "test3":
{
// Do something for test 3
break;
}
// =====> Then do something generic here for example if case is test1, test2 or test3
}