public override bool Equals(System.Object obj) { // If parameter cannot be cast to ThreeDPoint return false: ThreeDPoint p = obj as ThreeDPoint; if ((object)p == null) { return(false); } // Return true if the fields match: return(base.Equals(obj) && z == p.z); }
public bool Equals(ThreeDPoint p) { // Return true if the fields match: return(base.Equals((TwoDPoint)p) && z == p.z); }