Struct Size
Definition
- Namespace:
- ElmSharp
- Assembly:
- ElmSharp.dll
- API Level:
- preview
The Size is a struct defining the height and width as a pair of generic type.
C#Copypublic struct Size : IEquatable<Size>
- Implements
-
System.IEquatable<Size>
Constructors
Size(Int32, Int32)
Initializes a new instance of the size structure from specified dimensions.
Declaration
C#Copypublic Size(int width, int height)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | width | The width to set. |
System.Int32 | height | The height to set. |
API Level: preview
Fields
Declaration
C#Copypublic int Height
Field Value
Type | Description |
---|---|
System.Int32 |
API Level: preview
Declaration
C#Copypublic int Width
Field Value
Type | Description |
---|---|
System.Int32 |
API Level: preview
Methods
Declaration
C#Copypublic bool Equals(Size other)
Parameters
Type | Name | Description |
---|---|---|
Size | other | The Size to compare with the current instance. |
Returns
Type | Description |
---|---|
System.Boolean | true if the object and this instance are of the same type and represent the same value, otherwise false. |
API Level: preview
Declaration
C#Copypublic override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | The object to compare with the current instance. |
Returns
Type | Description |
---|---|
System.Boolean | true if the object and this instance are of the same type and represent the same value, otherwise false. |
Overrides
API Level: preview
Declaration
C#Copypublic override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | The hash code. |
Overrides
API Level: preview
Declaration
C#Copypublic override string ToString()
Returns
Type | Description |
---|---|
System.String | The string is formatted as "{{Width={0} Height={1}}}". |
Overrides
API Level: preview
Operators
Declaration
C#Copypublic static bool operator ==(Size s1, Size s2)
Parameters
Type | Name | Description |
---|---|---|
Size | s1 | A Size on the left hand side. |
Size | s2 | A Size on the right hand side. |
Returns
Type | Description |
---|---|
System.Boolean | True if both Sizes have equal values. |
API Level: preview
Declaration
C#Copypublic static bool operator !=(Size s1, Size s2)
Parameters
Type | Name | Description |
---|---|---|
Size | s1 | A Size on the left hand side. |
Size | s2 | A Size on the right hand side. |
Returns
Type | Description |
---|---|
System.Boolean | True if both Sizes do not have equal values. |