Rectangle rect = new Rectangle(10, 10, 50, 50); rect.Offset(0, 10);
Rectangle rect = new Rectangle(10, 10, 50, 50); rect.Offset(20, 30);Here, we again define a new rectangle but this time use the Offset method to shift it to a completely new starting point at (30,40). The size of the rectangle remains the same. This method is included in the System.Drawing.dll package library.
Adjusts the location of this rectangle by the specified amount.
|public Offset ( Point pos ) : void|