Ejemplo n.º 1
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }
            else if (!(obj is PointType <T>))
            {
                return(false);
            }
            else if (Object.ReferenceEquals(this, obj))
            {
                return(true);
            }

            PointType <T> myObj = (PointType <T>)obj;

            return
                (myObj.x.Equals(x) &&
                 myObj.y.Equals(y));
        }
Ejemplo n.º 2
0
 public RectangleType(T x, T y, T width, T height)
 {
     this.location = new PointType <T>(x, y);
     this.size     = new SizeType <T>(width, height);
 }
Ejemplo n.º 3
0
 public RectangleType(PointType <T> location, SizeType <T> size)
 {
     this.location = location;
     this.size     = size;
 }