Size Struct
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Struct defining height and width as a pair of doubles.
[System.Diagnostics.DebuggerDisplay("Width={Width}, Height={Height}")]
[Xamarin.Forms.TypeConverter(typeof(Xamarin.Forms.SizeTypeConverter))]
public struct Size
type Size = struct
- Inheritance
-
System.ValueTypeSize
- Attributes
-
System.Diagnostics.DebuggerDisplayAttribute TypeConverterAttribute
Remarks
Application developers should be aware of the limits of floating-point representations, specifically the possibility of incorrect comparisons and equality checks for values with small differences. David Goldberg's paper What Every Computer Scientist Should Know About Floating-Point Arithmetic describes the issues excellently.
Constructors
Size(Double, Double) |
Creates a new Size object with |
Fields
Zero |
The Size whose values for height and width are 0.0. |
Properties
Height |
Magnitude along the vertical axis, in platform-specific units. |
IsZero | |
Width |
Magnitude along the horizontal axis, in platform-defined units. |
Methods
Deconstruct(Double, Double) | |
Equals(Object) |
Whether |
Equals(Size) |
Whether |
GetHashCode() |
Returns a hash value for the Size. |
ToString() |
Returns a human-readable representation of the Size. |
Operators
Addition(Size, Size) |
Returns a new Size whose Height and Width are the sum of the component's height and width. |
Equality(Size, Size) |
Whether two Sizes have equal values. |
Explicit(Size to Point) | |
Inequality(Size, Size) |
Whether two Sizes have unequal values. |
Multiply(Size, Double) | |
Subtraction(Size, Size) |
Returns a new Size whose Height and Width are |