switch expression with if in c# code example
Example: c# switch case with or condition
int i = 5;
switch (i)
{
case(1):
case(2):
Console.WriteLine(i);
break;
default:
break;
}
int i = 5;
switch (i)
{
case(1):
case(2):
Console.WriteLine(i);
break;
default:
break;
}