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