Created
February 22, 2014 23:16
-
-
Save MarkyC/9163893 to your computer and use it in GitHub Desktop.
Example Showing single line if versus using braces
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
void foo(int a, int b, int c) { | |
if ( (0 == a) || (0 == b) || (0 == c) ) throw new Exception(); | |
... | |
} | |
VS | |
void foo (int a, int b, int c) { | |
if ( (0 == a) || (0 == b) || (0 == c) ) { | |
throw new Exception(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment