LengthValue
ReferencesRepresents a length with an associated unit system and a string representation of that length. This allows for going back and forth from numerical representation of a length and a string representation without "guessing" at the initial string
Finalizer
Properties
Returns the context AngleUnitSystem from this LengthValue's ParseSettings
returns the context LocaleId from this LengthValue
Returns the StringFormat from this LengthValue
Methods
Changes the numeric value in a LengthValue and leaves all of the other info unchanged UnitSystem, ParseSettings and StringFormat stay as they were
Parameters:
| newLength (double) |
Returns: A new LengthValue
Change the UnitSystem of a LengthValue The numeric value of Length is scaled by new_us / current unit system so that the absolute length stays the same
Parameters:
| newUnits (LengthUnit) |
Change the UnitSystem of a LengthValue The numeric value of Length is scaled by new_us / current unit system so that the absolute length stays the same
Parameters:
| newUnits (UnitSystem) |
[CLSCompliant(false)]
public static LengthValue Create(double length, LengthUnit units, StringFormat format, uint localeId)
Create from Length and LengthUnit
Parameters:
| length (double) | Numeric length value |
| units (LengthUnit) | Length units |
| format (LengthValue.StringFormat) | |
| localeId (uint) |
[CLSCompliant(false)]
public static LengthValue Create(double length, LengthUnit units, StringFormat format)
Create from Length and LengthUnit
Parameters:
| length (double) | Numeric length value |
| units (LengthUnit) | Length units |
| format (LengthValue.StringFormat) |
[CLSCompliant(false)]
public static LengthValue Create(double length, UnitSystem us, StringFormat format, uint localeId)
Create from Length and UnitSystem
Parameters:
| length (double) | Numeric length value |
| us (UnitSystem) | Unit system |
| format (LengthValue.StringFormat) | |
| localeId (uint) |
Create from Length and UnitSystem
Parameters:
| length (double) | Numeric length value |
| us (UnitSystem) | Unit system |
| format (LengthValue.StringFormat) |
Create from string
Parameters:
| s (string) | string to parse |
| ps (StringParserSettings) | |
| parsedAll (out bool) | true if the whole string was parsed |
Length value in a given unit system
Parameters:
| units (LengthUnit) |
Length value in a given unit system
Parameters:
| units (UnitSystem) |