Skip to content

Instantly share code, notes, and snippets.

@JunTaoLuo
Last active November 22, 2016 03:58
Show Gist options
  • Save JunTaoLuo/87f8b2e727c956333fa036f01b3275af to your computer and use it in GitHub Desktop.
Save JunTaoLuo/87f8b2e727c956333fa036f01b3275af to your computer and use it in GitHub Desktop.
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;
}
}
}
@JunTaoLuo
Copy link
Author

JunTaoLuo commented Nov 22, 2016

Output:

False condition

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment