Created
March 7, 2014 14:32
-
-
Save CalvinRodo/9412486 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
function bool test1(){ | |
Console.WriteLine("Test 1"); | |
return false; | |
} | |
function bool test2(){ | |
Console.WriteLine("Test 2"); | |
return false; | |
} | |
function void runtests_shortcircuit(){ | |
if (test1() && test2()){ | |
Console.WriteLine("Both are true!"); | |
} else { | |
Console.WriteLine("Both are not true."); | |
} | |
} | |
function void runtests_nonshortcircuit(){ | |
if (test1() & test2()){ | |
Console.WriteLine("Both are true!"); | |
} else { | |
Console.WriteLine("Both are not true."); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment