Last active
November 22, 2016 03:58
-
-
Save JunTaoLuo/87f8b2e727c956333fa036f01b3275af 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
using System; | |
namespace ConsoleApplication | |
{ | |
public class Program | |
{ | |
public static void Main(string[] args) | |
{ | |
if (FalseCondition() && AnotherFalseCondition()) | |
{ | |
Console.WriteLine("Both conditions were true"); | |
} | |
} | |
public static bool FalseCondition() | |
{ | |
Console.WriteLine("False condition"); | |
return false; | |
} | |
public static bool AnotherFalseCondition() | |
{ | |
Console.WriteLine("Another false condition"); | |
return false; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Output: