Class Size
Stores an ordered pair of integers, which specify a Height and Width.
Inheritance
System.Object
Size
Assembly: Terminal.Gui.dll
Syntax
public sealed class Size : ValueType
Constructors
Size(Int32, Int32)
Size Constructor
Declaration
public Size(int width, int height)
Parameters
| Type |
Name |
Description |
| System.Int32 |
width |
|
| System.Int32 |
height |
|
Size(Point)
Size Constructor
Declaration
Parameters
| Type |
Name |
Description |
| Point |
pt |
|
Fields
Empty
Gets a Size structure that has a Height and Width value of 0.
Declaration
public static readonly Size Empty
Field Value
Properties
Height
Height Property
Declaration
public int Height { get; set; }
Property Value
| Type |
Description |
| System.Int32 |
|
IsEmpty
IsEmpty Property
Declaration
public bool IsEmpty { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
Width
Width Property
Declaration
public int Width { get; set; }
Property Value
| Type |
Description |
| System.Int32 |
|
Methods
Add(Size, Size)
Adds the width and height of one Size structure to the width and height of another Size structure.
Declaration
public static Size Add(Size sz1, Size sz2)
Parameters
| Type |
Name |
Description |
| Size |
sz1 |
The first Size structure to add. |
| Size |
sz2 |
The second Size structure to add. |
Returns
| Type |
Description |
| Size |
The add. |
Equals(Object)
Equals Method
Declaration
public override bool Equals(object obj)
Parameters
| Type |
Name |
Description |
| System.Object |
obj |
|
Returns
| Type |
Description |
| System.Boolean |
|
GetHashCode()
GetHashCode Method
Declaration
public override int GetHashCode()
Returns
| Type |
Description |
| System.Int32 |
|
Subtract(Size, Size)
Subtracts the width and height of one Size structure to the width and height of another Size structure.
Declaration
public static Size Subtract(Size sz1, Size sz2)
Parameters
| Type |
Name |
Description |
| Size |
sz1 |
The first Size structure to subtract. |
| Size |
sz2 |
The second Size structure to subtract. |
Returns
| Type |
Description |
| Size |
The subtract. |
ToString()
ToString Method
Declaration
public override string ToString()
Returns
| Type |
Description |
| System.String |
|
Operators
Addition(Size, Size)
Addition Operator
Declaration
public static Size operator +(Size sz1, Size sz2)
Parameters
Returns
Equality(Size, Size)
Equality Operator
Declaration
public static bool operator ==(Size sz1, Size sz2)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
Explicit(Size to Point)
Size to Point Conversion
Declaration
public static explicit operator Point(Size size)
Parameters
| Type |
Name |
Description |
| Size |
size |
|
Returns
Inequality(Size, Size)
Inequality Operator
Declaration
public static bool operator !=(Size sz1, Size sz2)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
Subtraction(Size, Size)
Subtraction Operator
Declaration
public static Size operator -(Size sz1, Size sz2)
Parameters
Returns