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.
public struct Size : IEquatable<Size>
- Implements
Constructors
View SourceSize(Int32, Int32)
Initializes a new instance of the size structure from specified dimensions.
Declaration
public Size(int width, int height)
Parameters
Type | Name | Description |
---|---|---|
Int32 | width | The width to set. |
Int32 | height | The height to set. |
API Level: preview
Fields
View SourceHeight
Magnitude along the vertical axis, in platform-specific units.
Declaration
public int Height
Field Value
Type | Description |
---|---|
Int32 |
API Level: preview
View SourceWidth
Magnitude along the horizontal axis, in platform-defined units.
Declaration
public int Width
Field Value
Type | Description |
---|---|
Int32 |
API Level: preview
Methods
View SourceEquals(Size)
Indicates whether this instance and a Size object are equal.
Declaration
public bool Equals(Size other)
Parameters
Type | Name | Description |
---|---|---|
Size | other | The Size to compare with the current instance. |
Returns
Type | Description |
---|---|
Boolean | true if the object and this instance are of the same type and represent the same value, otherwise false. |
API Level: preview
View SourceEquals(Object)
Indicates whether this instance and a specified object are equal.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj | The object to compare with the current instance. |
Returns
Type | Description |
---|---|
Boolean | true if the object and this instance are of the same type and represent the same value, otherwise false. |
Overrides
API Level: preview
View SourceGetHashCode()
Gets the hash code.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 | The hash code. |
Overrides
API Level: preview
View SourceToString()
A human-readable representation of Size.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String | The string is formatted as "{{Width={0} Height={1}}}". |
Overrides
API Level: preview
Operators
View SourceEquality(Size, Size)
Whether both Sizes are equal.
Declaration
public 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 |
---|---|
Boolean | True if both Sizes have equal values. |
API Level: preview
View SourceInequality(Size, Size)
Whether both Sizes are not equal.
Declaration
public 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 |
---|---|
Boolean | True if both Sizes do not have equal values. |