c# multiple or statements code example
Example 1: can you have multiple statement in a case c#
switch (value)
{
case 1: case 2: case 3:
// Do Something
break;
case 4: case 5: case 6:
// Do Something
break;
default:
// Do Something
break;
}
Example 2: c# if statement with 2 conditions
if (checkbox.checked)
{
if (columnname != a && columnname != b && columnname != c)
{
"statement 1"
}
}
else
{
if (columnname != a && columnname != b && columnname != c
&& columnname != A2)
{
"statement 1"
}
}