Show / Hide Table of Contents

# Struct Size

Stores an ordered pair of integers, which specify a Height and Width.

###### Namespace: Terminal.Gui

###### Assembly: Terminal.Gui.dll

##### Syntax

    public struct Size

### Constructors

#### Size(Point)

Size Constructor

##### Declaration

    public Size (Terminal.Gui.Point pt);

##### Parameters

Type | Name | Description
--- | --- | ---
Point | pt | To be added.

##### Remarks

Creates a Size from a Point value.

#### Size(Int32, Int32)

Size Constructor

##### Declaration

    public Size (int width, int height);

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int32 | width | To be added.
System.Int32 | height | To be added.

##### Remarks

Creates a Size from specified dimensions.

### Fields

#### Empty

Gets a Size structure that has a Height and Width value of 0.

##### Declaration

    public static readonly Terminal.Gui.Size Empty;

##### Field Value

Type | Description
--- | ---
Size | To be added.

### Properties

#### Height

Height Property

##### Declaration

    public int Height { get; set; }

##### Property Value

Type | Description
--- | ---
System.Int32 | To be added.

##### Remarks

The Height coordinate of the Size.

#### IsEmpty

IsEmpty Property

##### Declaration

    public bool IsEmpty { get; }

##### Property Value

Type | Description
--- | ---
System.Boolean | To be added.

##### Remarks

Indicates if both Width and Height are zero.

#### Width

Width Property

##### Declaration

    public int Width { get; set; }

##### Property Value

Type | Description
--- | ---
System.Int32 | To be added.

##### Remarks

The Width coordinate of the Size.

### 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 Terminal.Gui.Size Add (Terminal.Gui.Size sz1, Terminal.Gui.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 | To be added.

##### Returns

Type | Description
--- | ---
System.Boolean | To be added.

##### Remarks

Checks equivalence of this Size and another object.

#### GetHashCode()

GetHashCode Method

##### Declaration

    public override int GetHashCode ();

##### Returns

Type | Description
--- | ---
System.Int32 | To be added.

##### Remarks

Calculates a hashing value.

#### Subtract(Size, Size)

##### Declaration

    public static Terminal.Gui.Size Subtract (Terminal.Gui.Size sz1, Terminal.Gui.Size sz2);

##### Parameters

Type | Name | Description
--- | --- | ---
Size | sz1 | To be added.
Size | sz2 | To be added.

##### Returns

Type | Description
--- | ---
Size | To be added.

#### ToString()

ToString Method

##### Declaration

    public override string ToString ();

##### Returns

Type | Description
--- | ---
System.String | To be added.

##### Remarks

Formats the Size as a string in coordinate notation.

### Operators

#### op_Addition(Size, Size)

Addition Operator

##### Declaration

    public static Terminal.Gui.Size op_Addition (Terminal.Gui.Size sz1, Terminal.Gui.Size sz2);

##### Parameters

Type | Name | Description
--- | --- | ---
Size | sz1 | To be added.
Size | sz2 | To be added.

##### Returns

Type | Description
--- | ---
Size | To be added.

##### Remarks

Addition of two Size structures.

#### op_Equality(Size, Size)

Equality Operator

##### Declaration

    public static bool op_Equality (Terminal.Gui.Size sz1, Terminal.Gui.Size sz2);

##### Parameters

Type | Name | Description
--- | --- | ---
Size | sz1 | To be added.
Size | sz2 | To be added.

##### Returns

Type | Description
--- | ---
System.Boolean | To be added.

##### Remarks

Compares two Size objects. The return value is based on the equivalence of the Width and Height properties of the two Sizes.

#### op_Explicit(Size to Point)

Size to Point Conversion

##### Declaration

    public static Terminal.Gui.Point op_Explicit (Terminal.Gui.Size size);

##### Parameters

Type | Name | Description
--- | --- | ---
Size | size | To be added.

##### Returns

Type | Description
--- | ---
Point | To be added.

##### Remarks

Returns a Point based on the dimensions of a given Size. Requires explicit cast.

#### op_Inequality(Size, Size)

Inequality Operator

##### Declaration

    public static bool op_Inequality (Terminal.Gui.Size sz1, Terminal.Gui.Size sz2);

##### Parameters

Type | Name | Description
--- | --- | ---
Size | sz1 | To be added.
Size | sz2 | To be added.

##### Returns

Type | Description
--- | ---
System.Boolean | To be added.

##### Remarks

Compares two Size objects. The return value is based on the equivalence of the Width and Height properties of the two Sizes.

#### op_Subtraction(Size, Size)

Subtraction Operator

##### Declaration

    public static Terminal.Gui.Size op_Subtraction (Terminal.Gui.Size sz1, Terminal.Gui.Size sz2);

##### Parameters

Type | Name | Description
--- | --- | ---
Size | sz1 | To be added.
Size | sz2 | To be added.

##### Returns

Type | Description
--- | ---
Size | To be added.

##### Remarks

Subtracts two Size structures.