-
-
Save WPDC/c88f66b994154dabc863 to your computer and use it in GitHub Desktop.
CS0110 3.4 Anatomy of switch/case
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
switch ( expression ) // expression's value is matched to each of the case statements. | |
case value1: // If the expression matches this value, then do this block of code. | |
// do something | |
break // stop and jump out of the switch | |
case value2: | |
// do something | |
break | |
case value3: | |
// do something | |
break | |
default: // "else" catch all code block If none of the others match, then do this one. | |
// do something |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment