Struct Size
Size struct
Namespace
Syntax
public struct Size
Constructors
Size(int, int)
Makes a new size instance
Declaration
public Size(int width, int height)
Parameters
| Name | Type | Description |
|---|---|---|
| width | int | A zero-based width |
| height | int | A zero-based height |
Properties
Height
Gets the height
Property Value
int
Declaration
public readonly int Height { get; }
Width
Gets the width
Property Value
int
Declaration
public readonly int Width { get; }
Methods
Equals(object?)
Returns
bool
Declaration
public override bool Equals(object? obj)
Parameters
| Name | Type | Description |
|---|---|---|
| obj | object |
Overrides
System.ValueType.Equals(object)
Equals(Size)
GetHashCode()
Returns
int
Declaration
public override int GetHashCode()
Overrides
System.ValueType.GetHashCode()
ToString()
Generates a string containing sizes
Returns
string
Width and height in a string
Declaration
public override string ToString()
Overrides
System.ValueType.ToString()
Operators
operator ==(Size, Size)
Returns
bool
Declaration
public static bool operator ==(Size left, Size right)
Parameters
| Name | Type | Description |
|---|---|---|
| left | Size | |
| right | Size |