Created
November 27, 2015 08:25
-
-
Save ViIvanov/e9137ccb7d289508349a 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; | |
class Program | |
{ | |
static void Main() { | |
var thing = new Thing(); | |
if(thing.A && thing == null) { | |
Console.WriteLine("thing == null"); | |
}//if | |
} | |
} | |
class Thing | |
{ | |
public bool A { get; } = true; | |
public override bool Equals(object obj) => true; | |
public override int GetHashCode() => 13; | |
public static bool operator ==(Thing a, Thing b) => true; | |
public static bool operator !=(Thing a, Thing b) => false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment