Rectangle
Microsoft Silverlight will reach end of support after October 2021. Learn more.
Namespace:Microsoft.Xna.Framework
Assembly: Microsoft.Xna.Framework (in Microsoft.Xna.Framework.dll)
Submit your issue and download BeyondTrust Remote Support. Copyright © 2002-2020 BeyondTrust Corporation. Redistribution Prohibited. Volume of a Rectangle Calculator. A Rectangular box is a geometrical figure bounded by six quadrilateral faces. The shape is also known as the rectangular cuboid, right cuboid, rectangular hexahedron, right rectangular prism, or rectangular parallelepiped. The volume of a rectangular box is the amount of space occupied by the object.
Syntax

A rectangle is a parallelogram with 4 right angles. Now, since a rectangle is a parallelogram, its opposite sides must be congruent and it must satisfy all other properties of parallelograms. The Properties of a Rectangle 4 Right Angles.
The Rectangle type exposes the following members.
Constructors
Name | Description |
---|---|
Rectangle | Initializes a new instance of Rectangle. |
Top
Properties
Name | Description |
---|---|
Bottom | Gets the y-coordinate of the bottom of the rectangle. |
Empty | Gets a Rectangle with all of its values set to zero. |
IsEmpty | Gets a value that indicates whether the rectangle is empty. |
Left | Gets the x-coordinate of the left side of the rectangle. |
Right | Gets the x-coordinate of the right side of the rectangle. |
Top | Gets the y-coordinate of the top of the rectangle. |
Top

Methods
Name | Description |
---|---|
Equals(Object) | Determines whether the specified Object is equal to the Rectangle. (Overrides ValueType.Equals(Object).) |
Equals(Rectangle) | Determines whether the current instance is equal to a specified object. |
GetHashCode | Gets the hash code for this object. (Overrides ValueType.GetHashCode().) |
ToString | Retrieves a string representation of the current object. (Overrides ValueType.ToString().) |
Top
Operators
Name | Description |
---|---|
Equality | Compares two rectangles for equality. |
Inequality | Compares two rectangles for inequality. |
Top
Fields
Name | Description |
---|---|
Height | Specifies the x-coordinate of the rectangle. |
Width | Specifies the width of the rectangle. |
X | Specifies the x-coordinate of the rectangle. |
Y | Specifies the y-coordinate of the rectangle. |
Top
Platforms
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Rectangle Mirror
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Rectangle Pool
See Also
Rectangle Calculator
Reference
