Struct Length
- Namespace
- UnitsNet
- Assembly
- nanoFramework.UnitsNet.Length.dll
Many different units of length have been used around the world. The main units in modern use are U.S. customary units in the United States and the Metric system elsewhere. British Imperial units are still used for some purposes in the United Kingdom and some other countries. The metric system is sub-divided into SI and non-SI units.
public struct Length
Constructors
Length(double, LengthUnit)
Creates the quantity with the given numeric value and unit.
public Length(double value, LengthUnit unit)
Parameters
valuedoubleThe numeric value to construct this quantity with.
unitLengthUnitThe unit representation to construct this quantity with.
Properties
Angstroms
public double Angstroms { get; }
Property Value
AstronomicalUnits
Gets a double value of this quantity converted into AstronomicalUnit
public double AstronomicalUnits { get; }
Property Value
BaseUnit
The base unit of Length, which is Second. All conversions go via this value.
public static LengthUnit BaseUnit { get; }
Property Value
Centimeters
Gets a double value of this quantity converted into Centimeter
public double Centimeters { get; }
Property Value
Chains
public double Chains { get; }
Property Value
DataMiles
public double DataMiles { get; }
Property Value
Decameters
public double Decameters { get; }
Property Value
Decimeters
public double Decimeters { get; }
Property Value
DtpPicas
public double DtpPicas { get; }
Property Value
DtpPoints
public double DtpPoints { get; }
Property Value
Fathoms
public double Fathoms { get; }
Property Value
Feet
public double Feet { get; }
Property Value
Femtometers
Gets a double value of this quantity converted into Femtometer
public double Femtometers { get; }
Property Value
Gigameters
public double Gigameters { get; }
Property Value
Hands
public double Hands { get; }
Property Value
Hectometers
Gets a double value of this quantity converted into Hectometer
public double Hectometers { get; }
Property Value
Inches
public double Inches { get; }
Property Value
Kilofeet
public double Kilofeet { get; }
Property Value
KilolightYears
Gets a double value of this quantity converted into KilolightYear
public double KilolightYears { get; }
Property Value
Kilometers
public double Kilometers { get; }
Property Value
Kiloparsecs
Gets a double value of this quantity converted into Kiloparsec
public double Kiloparsecs { get; }
Property Value
Kiloyards
public double Kiloyards { get; }
Property Value
LightYears
public double LightYears { get; }
Property Value
MaxValue
Represents the largest possible value of Length.
public static Length MaxValue { get; }
Property Value
MegalightYears
Gets a double value of this quantity converted into MegalightYear
public double MegalightYears { get; }
Property Value
Megameters
public double Megameters { get; }
Property Value
Megaparsecs
Gets a double value of this quantity converted into Megaparsec
public double Megaparsecs { get; }
Property Value
Meters
public double Meters { get; }
Property Value
Microinches
public double Microinches { get; }
Property Value
Micrometers
Gets a double value of this quantity converted into Micrometer
public double Micrometers { get; }
Property Value
Miles
public double Miles { get; }
Property Value
Millimeters
Gets a double value of this quantity converted into Millimeter
public double Millimeters { get; }
Property Value
Mils
public double Mils { get; }
Property Value
MinValue
Represents the smallest possible value of Length.
public static Length MinValue { get; }
Property Value
Nanometers
public double Nanometers { get; }
Property Value
NauticalMiles
Gets a double value of this quantity converted into NauticalMile
public double NauticalMiles { get; }
Property Value
Parsecs
public double Parsecs { get; }
Property Value
Picometers
public double Picometers { get; }
Property Value
PrinterPicas
Gets a double value of this quantity converted into PrinterPica
public double PrinterPicas { get; }
Property Value
PrinterPoints
Gets a double value of this quantity converted into PrinterPoint
public double PrinterPoints { get; }
Property Value
Shackles
public double Shackles { get; }
Property Value
SolarRadiuses
Gets a double value of this quantity converted into SolarRadius
public double SolarRadiuses { get; }
Property Value
Twips
public double Twips { get; }
Property Value
Unit
public LengthUnit Unit { get; }
Property Value
UsSurveyFeet
Gets a double value of this quantity converted into UsSurveyFoot
public double UsSurveyFeet { get; }
Property Value
Value
The numeric value this quantity was constructed with.
public double Value { get; }
Property Value
Yards
public double Yards { get; }
Property Value
Zero
Gets an instance of this quantity with a value of 0 in the base unit Second.
public static Length Zero { get; }
Property Value
Methods
As(LengthUnit)
Convert to the unit representation unit.
public double As(LengthUnit unit)
Parameters
unitLengthUnit
Returns
- double
Value converted to the specified unit.
From(double, LengthUnit)
Dynamically convert from value and unit enum LengthUnit to Length.
public static Length From(double value, LengthUnit fromUnit)
Parameters
valuedoubleValue to convert from.
fromUnitLengthUnitUnit to convert from.
Returns
- Length
Length unit value.
FromAngstroms(double)
public static Length FromAngstroms(double angstroms)
Parameters
angstromsdouble
Returns
FromAstronomicalUnits(double)
Creates a Length from AstronomicalUnit.
public static Length FromAstronomicalUnits(double astronomicalunits)
Parameters
astronomicalunitsdouble
Returns
FromCentimeters(double)
Creates a Length from Centimeter.
public static Length FromCentimeters(double centimeters)
Parameters
centimetersdouble
Returns
FromChains(double)
public static Length FromChains(double chains)
Parameters
chainsdouble
Returns
FromDataMiles(double)
public static Length FromDataMiles(double datamiles)
Parameters
datamilesdouble
Returns
FromDecameters(double)
public static Length FromDecameters(double decameters)
Parameters
decametersdouble
Returns
FromDecimeters(double)
public static Length FromDecimeters(double decimeters)
Parameters
decimetersdouble
Returns
FromDtpPicas(double)
public static Length FromDtpPicas(double dtppicas)
Parameters
dtppicasdouble
Returns
FromDtpPoints(double)
public static Length FromDtpPoints(double dtppoints)
Parameters
dtppointsdouble
Returns
FromFathoms(double)
public static Length FromFathoms(double fathoms)
Parameters
fathomsdouble
Returns
FromFeet(double)
public static Length FromFeet(double feet)
Parameters
feetdouble
Returns
FromFemtometers(double)
Creates a Length from Femtometer.
public static Length FromFemtometers(double femtometers)
Parameters
femtometersdouble
Returns
FromGigameters(double)
public static Length FromGigameters(double gigameters)
Parameters
gigametersdouble
Returns
FromHands(double)
public static Length FromHands(double hands)
Parameters
handsdouble
Returns
FromHectometers(double)
Creates a Length from Hectometer.
public static Length FromHectometers(double hectometers)
Parameters
hectometersdouble
Returns
FromInches(double)
public static Length FromInches(double inches)
Parameters
inchesdouble
Returns
FromKilofeet(double)
public static Length FromKilofeet(double kilofeet)
Parameters
kilofeetdouble
Returns
FromKilolightYears(double)
Creates a Length from KilolightYear.
public static Length FromKilolightYears(double kilolightyears)
Parameters
kilolightyearsdouble
Returns
FromKilometers(double)
public static Length FromKilometers(double kilometers)
Parameters
kilometersdouble
Returns
FromKiloparsecs(double)
Creates a Length from Kiloparsec.
public static Length FromKiloparsecs(double kiloparsecs)
Parameters
kiloparsecsdouble
Returns
FromKiloyards(double)
public static Length FromKiloyards(double kiloyards)
Parameters
kiloyardsdouble
Returns
FromLightYears(double)
public static Length FromLightYears(double lightyears)
Parameters
lightyearsdouble
Returns
FromMegalightYears(double)
Creates a Length from MegalightYear.
public static Length FromMegalightYears(double megalightyears)
Parameters
megalightyearsdouble
Returns
FromMegameters(double)
public static Length FromMegameters(double megameters)
Parameters
megametersdouble
Returns
FromMegaparsecs(double)
Creates a Length from Megaparsec.
public static Length FromMegaparsecs(double megaparsecs)
Parameters
megaparsecsdouble
Returns
FromMeters(double)
public static Length FromMeters(double meters)
Parameters
metersdouble
Returns
FromMicroinches(double)
public static Length FromMicroinches(double microinches)
Parameters
microinchesdouble
Returns
FromMicrometers(double)
Creates a Length from Micrometer.
public static Length FromMicrometers(double micrometers)
Parameters
micrometersdouble
Returns
FromMiles(double)
public static Length FromMiles(double miles)
Parameters
milesdouble
Returns
FromMillimeters(double)
Creates a Length from Millimeter.
public static Length FromMillimeters(double millimeters)
Parameters
millimetersdouble
Returns
FromMils(double)
public static Length FromMils(double mils)
Parameters
milsdouble
Returns
FromNanometers(double)
public static Length FromNanometers(double nanometers)
Parameters
nanometersdouble
Returns
FromNauticalMiles(double)
Creates a Length from NauticalMile.
public static Length FromNauticalMiles(double nauticalmiles)
Parameters
nauticalmilesdouble
Returns
FromParsecs(double)
public static Length FromParsecs(double parsecs)
Parameters
parsecsdouble
Returns
FromPicometers(double)
public static Length FromPicometers(double picometers)
Parameters
picometersdouble
Returns
FromPrinterPicas(double)
Creates a Length from PrinterPica.
public static Length FromPrinterPicas(double printerpicas)
Parameters
printerpicasdouble
Returns
FromPrinterPoints(double)
Creates a Length from PrinterPoint.
public static Length FromPrinterPoints(double printerpoints)
Parameters
printerpointsdouble
Returns
FromShackles(double)
public static Length FromShackles(double shackles)
Parameters
shacklesdouble
Returns
FromSolarRadiuses(double)
Creates a Length from SolarRadius.
public static Length FromSolarRadiuses(double solarradiuses)
Parameters
solarradiusesdouble
Returns
FromTwips(double)
public static Length FromTwips(double twips)
Parameters
twipsdouble
Returns
FromUsSurveyFeet(double)
Creates a Length from UsSurveyFoot.
public static Length FromUsSurveyFeet(double ussurveyfeet)
Parameters
ussurveyfeetdouble
Returns
FromYards(double)
public static Length FromYards(double yards)
Parameters
yardsdouble
Returns
ToUnit(LengthUnit)
Converts this Length to another Length with the unit representation unit.
public Length ToUnit(LengthUnit unit)
Parameters
unitLengthUnit
Returns
- Length
A Length with the specified unit.