public override bool Equals(object obj) { if (obj == null || GetType() != obj.GetType()) { return false; } RectCourseObj other = (RectCourseObj) obj; if (!(rect.Equals(other.rect))) return false; return base.Equals(obj); }