Size Struct
A structure used to describe the size of an object.
Implements
Constructors
Size(Double, Double)
Parameters
width
- System.Double
The width in points.
height
- System.Double
The height in points.
Size(Double, Double, LengthUnit)
Initializes a new instance of the Size struct using the specified measurement unit.
public Size(double width, double height, LengthUnit unit)
Public Sub New(width As Double, height As Double, unit As LengthUnit)
Parameters
width
- System.Double
The width in units specified by unit
parameter.
height
- System.Double
The height in units specified by unit
parameter.
unit
- LengthUnit
The measurement unit for width
and height
.
Properties
Height
Gets the height in points.
Property Value
- System.Double
The height in points.
Width
Gets the width in points.
Property Value
- System.Double
The width in points.
Methods
Equals(Size)
Parameters
other
- Size
The other size to compare with this size instance.
Returns
Equals(Object)
Determines whether the specified System.Object is equal to this Size instance.
public override bool Equals(object obj)
Public Overrides Function Equals(obj As Object) As Boolean
Parameters
obj
- System.Object
The System.Object to compare with this size instance.
Returns
- System.Boolean
Overrides
GetHashCode()
Returns a hash code for this Size instance.
Returns
- System.Int32
An integer value that specifies a hash value for this Size instance.
Overrides
ToString()
Returns a System.String that represents this Size instance.
Returns
- System.String
A System.String that represents this Size instance.
Overrides
Operators
Equality(Size, Size)
Determines whether first
and second
Sizes are equal.
public static bool operator ==(Size first, Size second)
Public Shared Operator =(first As Size, second As Size) As Boolean
Parameters
first
- Size
The first size.
second
- Size
The second size.
Returns
- System.Boolean
true if first
and second
size are equal; otherwise, false.
Inequality(Size, Size)
Determines whether first
and second
Sizes are not equal.
public static bool operator !=(Size first, Size second)
Public Shared Operator <>(first As Size, second As Size) As Boolean
Parameters
first
- Size
The first size.
second
- Size
The second size.
Returns
- System.Boolean
true if first
and second
size are not equal; otherwise, false.