1
0
mirror of https://github.com/adambard/learnxinyminutes-docs.git synced 2025-08-02 12:57:53 +02:00

added details for the switch statement for C#

This commit is contained in:
Melvyn
2013-09-21 15:39:59 -04:00
parent 41cf74fa53
commit 67b9af4492

View File

@@ -343,6 +343,14 @@ namespace Learning
case 3: case 3:
monthString = "March"; monthString = "March";
break; break;
// You can assign more than one case to an action
// But you can't add an action without a break before another case
// (if you want to do this, you would have to explicitly add a goto case x
case 6:
case 7:
case 8:
monthString = "Summer time!!";
break;
default: default:
monthString = "Some other month"; monthString = "Some other month";
break; break;