Rectangle

Rectangle class

Stores a set of four integers that represent the location and size of a rectangle.

The Rectangle type exposes the following members:

Constructors

NameDescription
Rectangle(x, y, width, height)Initializes a new instance of the Rectangle class
Rectangle()Initializes a new instance of the Rectangle class

Properties

NameDescription
emptyGets a new instance of the
xGets or sets the x-coordinate of the upper-left corner of this
yGets or sets the y-coordinate of the upper-left corner of this
widthGets or sets the width of this
heightGets or sets the height of this
leftGets or sets the x-coordinate of the left edge of this
topGets or sets the y-coordinate of the top edge of this
rightGets or sets the x-coordinate that is the sum of
bottomGets or sets the y-coordinate that is the sum of the
is_emptyGets a value indicating whether all numeric properties of this

Methods

NameDescription
contains(x, y)Determines if the specified point is contained within this

See Also