This documentation is archived and is not being maintained.

Rectangle Members

The following tables list the members exposed by the Rectangle type.

Public MethodRectangleInitializes a new instance of Rectangle.

Public FieldHeightSpecifies the height of the rectangle.
Public FieldWidthSpecifies the width of the rectangle.
Public FieldXSpecifies the x-coordinate of the rectangle.
Public FieldYSpecifies the y-coordinate of the rectangle.

Public PropertyBottomReturns the y-coordinate of the bottom of the rectangle.
Public PropertyCenterGets the Point that specifies the center of the rectangle.
Public Property StaticEmptyReturns a Rectangle with all of its values set to zero.
Public PropertyIsEmptyGets a value that indicates whether the Rectangle is empty.
Public PropertyLeftReturns the x-coordinate of the left side of the rectangle.
Public PropertyLocationGets or sets the upper-left value of the Rectangle.
Public PropertyRightReturns the x-coordinate of the right side of the rectangle.
Public PropertyTopReturns the y-coordinate of the top of the rectangle.

Public MethodContainsOverloaded. Determines whether this Rectangle contains a specified point or Rectangle.
Public MethodEqualsOverloaded. Returns a value that indicates whether the current instance is equal to a specified object.
Public MethodGetHashCodeGets the hash code for this object.
Public MethodGetType (Inherited from Object.)
Public MethodInflatePushes the edges of the Rectangle out by the horizontal and vertical values specified.
Public Method StaticIntersectOverloaded. Creates a Rectangle defining the area where one rectangle overlaps another rectangle.
Public MethodIntersectsOverloaded. Determines whether a specified Rectangle intersects with this Rectangle.
Public MethodOffsetOverloaded. Changes the position of the Rectangle.
Public Method Staticop_EqualityCompares two rectangles for equality.
Public Method Staticop_InequalityCompares two rectangles for inequality.
Public MethodReferenceEquals (Inherited from Object.)
Public MethodToStringRetrieves a string representation of the current object.
Public Method StaticUnionOverloaded. Creates a new Rectangle that exactly contains two other rectangles.

Protected MethodFinalize (Inherited from Object.)
Protected MethodMemberwiseClone (Inherited from Object.)