public override bool Equals(object obj) { Ellipse other = obj as Ellipse; if (other == null) return false; return (Math.Abs(MajorRadius - other.MajorRadius) < 0.000001) && (Math.Abs(MinorRadius - other.MinorRadius) < 0.000001); }