mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 15:24:09 +03:00
added details for the switch statement for C#
This commit is contained in:
parent
41cf74fa53
commit
67b9af4492
@ -343,6 +343,14 @@ namespace Learning
|
||||
case 3:
|
||||
monthString = "March";
|
||||
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:
|
||||
monthString = "Some other month";
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user