Rectangle.Rectangle

Rectangle(int, int, int, int)

Initializes a new instance of the Rectangle structure with the specified location and size.

public Rectangle(int x, int y, int width, int height)
ParameterTypeDescription
xInt32The x-coordinate of the upper-left corner of the rectangle.
yInt32The y-coordinate of the upper-left corner of the rectangle.
widthInt32The width of the rectangle.
heightInt32The height of the rectangle.

See Also


Rectangle(Point, Size)

Initializes a new instance of the Rectangle struct with the specified location and size.

public Rectangle(Point location, Size size)
ParameterTypeDescription
locationPointA Point that represents the upper-left corner of the rectangular region.
sizeSizeA Size that represents the width and height of the rectangular region.

See Also