Struct Size
Size structure
Stores an ordered pair of integers, typically the width and height of a rectangle.
public struct Size : IEquatable<Size>
Constructors
| Name | Description | 
|---|
| Size(Point) | Initializes a new instance of the Sizestruct from the specified Point. | 
| Size(int, int) | Initializes a new instance of the Sizestruct from the specified dimensions. | 
Properties
| Name | Description | 
|---|
| Height { get; set; } | Gets or sets the vertical component of this Size. | 
| IsEmpty { get; } | Gets a value indicating whether this Size has width and height of 0. | 
| Width { get; set; } | Gets or sets the horizontal component of this Size. | 
Methods
| Name | Description | 
|---|
| static Add(Size, Size) | Adds the width and height of one Size structure to the width and height of another Size structure. | 
| static Ceiling(SizeF) | Converts the specified SizeF structure to a Size structure by rounding the values of the Size structure to the next higher integer values. | 
| static Round(SizeF) | Converts the specified SizeF structure to a Size structure by rounding the values of the SizeF structure to the nearest integer values. | 
| static Subtract(Size, Size) | Subtracts the width and height of one Size structure from the width and height of another Size structure. | 
| static Truncate(SizeF) | Converts the specified SizeF structure to a Size structure by truncating the values of the SizeF structure to the next lower integer values. | 
| override Equals(object) | Tests to see whether the specified object is a Size with the same dimensions as this Size. | 
| Equals(Size) | Tests whether other Sizestructure has the same size of thisSizestructure. | 
| override GetHashCode() | Returns a hash code for this Size structure. | 
| override ToString() | Converts the attributes of this Sizeto a human readable string. | 
| operator + | Adds the width and height of one Size structure to the width and height of another Size structure. | 
| operator / | Divides Sizeby an Int32 producingSize. (2 operators) | 
| operator == | Tests whether two Size structures are equal. | 
| explicit operator | Converts the specified Size to a Point. | 
| implicit operator | Converts the specified Size to a SizeF. | 
| operator != | Tests whether two Size structures are different. | 
| operator * | Multiplies a Sizeby an Int32 producingSize. (4 operators) | 
| operator - | Subtracts the width and height of one Size structure from the width and height of another Size structure. | 
Fields
| Name | Description | 
|---|
| static readonly Empty | Gets a Size structure that has a Height and Width value of 0. | 
See Also