KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Inspired from a -5 question again! Is empty case of switch in C# combined with the next non-empty one? I read [ this comment ] of @Quartermeister and been astonished! So why this compiles switch(1) { case 2: } but this doesn't. int i; switch(i=1) { case 2: // Control cannot fall through from one case label ('case 2:') to another } neither this switch(2) { case 2: // Control cannot fall through from one case label ('case 2:') to another } update: The -5 question became -3 .
Tags (comma-separated)
Save Edits
Cancel