Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

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;
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #multiple #statement #case
ADD COMMENT
Topic
Name
5+4 =