public bool Equals(NullableInt64 x) { return Equals(this, x); }
public static bool Equals(NullableInt64 x, NullableInt64 y) { if (x.HasValue != y.HasValue) //one is null return false; else if (x.HasValue) //therefor y also HasValue return x.Value == y.Value; else //both are null return true; }