public bool Equals(Dimension dimension) { if (this.X == dimension.X && this.Y == dimension.Y) return true; return false; }
public static Dimension operator +(Dimension dim1, Dimension dim2) { Dimension res = new Dimension(); res.X = dim1.X + dim2.X; res.Y = dim1.Y + dim2.Y; return res; }