RectangleF rect = new RectangleF(10, 10, 20, 30); rect.Offset(5, 5);
RectangleF rect = new RectangleF(10, 10, 20, 30); SizeF size = new SizeF(5, 5); rect.Offset(size);In this example, a SizeF object is created with width 5 and height 5. The Offset method is called with the SizeF object to move the rectangle 5 units to the right and 5 units downwards. These examples use the System.Drawing.dll library, which is part of the .NET Framework.
public Offset ( |
||
pos | ||
return | void |