switch 2 cases with the same result code example
Example: switch 2 cases with the same result
switch (x)
{
case 1:
case 2:
Console.WriteLine("x = 1 or x = 2");
break;
default:
break;
}
switch (x)
{
case 1:
case 2:
Console.WriteLine("x = 1 or x = 2");
break;
default:
break;
}