public bool Equals(TwoDPoint p)
 {
     if ((object)p == null)
     {
         return(false);
     }
     return((x == p.x) && (y == p.y));
 }
        public override bool Equals(Object obj)
        {
            if (obj == null)
            {
                return(false);
            }
            TwoDPoint p = obj as TwoDPoint;

            if ((Object)p == null)
            {
                return(false);
            }
            return((x == p.x) && (y == p.y));
        }