Skip to content

Instantly share code, notes, and snippets.

@ViIvanov
Created November 27, 2015 08:25
Show Gist options
  • Save ViIvanov/e9137ccb7d289508349a to your computer and use it in GitHub Desktop.
Save ViIvanov/e9137ccb7d289508349a to your computer and use it in GitHub Desktop.
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