This documentation is archived and is not being maintained.
Size Structure
Visual Studio 2010
Namespace: System.Drawing
Assembly: System.Drawing (in System.Drawing.dll)
The Size type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | Size(Point) | Initializes a new instance of the Size structure from the specified Point structure. |
![]() | Size(Int32, Int32) | Initializes a new instance of the Size structure from the specified dimensions. |
| Name | Description | |
|---|---|---|
![]() ![]() | Add | Adds the width and height of one Size structure to the width and height of another Size structure. |
![]() ![]() | Ceiling | Converts the specified SizeF structure to a Size structure by rounding the values of the Size structure to the next higher integer values. |
![]() | Equals | Tests to see whether the specified object is a Size structure with the same dimensions as this Size structure. (Overrides ValueType::Equals(Object).) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetHashCode | Returns a hash code for this Size structure. (Overrides ValueType::GetHashCode().) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() ![]() | Round | Converts the specified SizeF structure to a Size structure by rounding the values of the SizeF structure to the nearest integer values. |
![]() ![]() | Subtract | Subtracts the width and height of one Size structure from the width and height of another Size structure. |
![]() | ToString | Creates a human-readable string that represents this Size structure. (Overrides ValueType::ToString().) |
![]() ![]() | Truncate | Converts the specified SizeF structure to a Size structure by truncating the values of the SizeF structure to the next lower integer values. |
| Name | Description | |
|---|---|---|
![]() ![]() | Addition | Adds the width and height of one Size structure to the width and height of another Size structure. |
![]() ![]() | Equality | Tests whether two Size structures are equal. |
![]() ![]() | Explicit(Size to Point) | Converts the specified Size structure to a Point structure. |
![]() ![]() | Implicit(Size to SizeF) | Converts the specified Size structure to a SizeF structure. |
![]() ![]() | Inequality | Tests whether two Size structures are different. |
![]() ![]() | Subtraction | Subtracts the width and height of one Size structure from the width and height of another Size structure. |
The Size class is used to specify a height and width through the Size property for Rectangle, RectangleF, Image, Icon and other graphics classes. You can perform operations on a Size by using the overloaded operators such as Addition(Size, Size), Subtraction(Size, Size), and Equality(Size, Size). The unit for the Height and Width of the Size structure depend on the PageUnit and PageScale settings for the Graphics object that is used to draw.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show:
