示例#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));
        }
示例#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);
 }
示例#3
0
 public RectangleType(PointType <T> location, SizeType <T> size)
 {
     this.location = location;
     this.size     = size;
 }