I am implementing IComparible with
public int CompareTo(RangeEx range)
{
if (range == null)
return 1;
// more stuff
}
public static bool operator ==(RangeEx x, RangeEx y) { return x.CompareTo(y) == 0; }
The problem is the "if (range == null)" calls the operator overload. How can I do the check for null by not calling the overload?