Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# switch case with or condition

int i = 5;
switch (i)
{
    case(1):
    case(2):
        Console.WriteLine(i);
        break;
    default:
        break;
}
Source by www.c-sharpcorner.com #
 
PREVIOUS NEXT
Tagged: #switch #case #condition
ADD COMMENT
Topic
Name
2+9 =