Created
July 1, 2011 13:28
-
-
Save Andrea/1058541 to your computer and use it in GitHub Desktop.
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
public void MyMethod() | |
{ | |
switch ( something ) | |
{ | |
// other stuff ... | |
case x: | |
{ | |
// do some stuff here | |
// need to perform case y too for this specific case | |
DoSomethingImportant(); | |
//break; // not allowed to not have the break | |
} | |
case y: | |
{ | |
DoSomethingImportant(); | |
// do some more stuff here | |
break; | |
} | |
} | |
} | |
public void DoSomethingImportant() | |
{ | |
//Some logic that needs to be reused | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment