Skip to main content

Struct Length

Represents Length

Assembly: Meadow.Units.dll
View Source
[Serializable]
public struct Length : IComparable, IFormattable, IConvertible, IEquatable<double>, IComparable<double>

Implements:
System.IComparable, System.IFormattable, System.IConvertible, System.IEquatable<System.Double>, System.IComparable<System.Double>

Properties

Zero

Gets a Length of 0

View Source
public static Length Zero { get; }

Kilometers

Get length value as Kilometers

View Source
public readonly double Kilometers { get; }

Meters

Get length value as Meters

View Source
public readonly double Meters { get; }

Centimeters

Get length value as Centimeters

View Source
public readonly double Centimeters { get; }

Decimeters

Get length value as Decimeters

View Source
public readonly double Decimeters { get; }

Millimeters

Get length value as Millimeters

View Source
public readonly double Millimeters { get; }

Microns

Get length value as Microns

View Source
public readonly double Microns { get; }

Nanometers

Get length value as Nanometers

View Source
public readonly double Nanometers { get; }

Miles

Get length value as Miles

View Source
public readonly double Miles { get; }

NauticalMiles

Get length value as NauticalMiles

View Source
public readonly double NauticalMiles { get; }

Yards

Get length value as Yards

View Source
public readonly double Yards { get; }

Feet

Get length value as Feet

View Source
public readonly double Feet { get; }

Inches

Get length value as Inches

View Source
public readonly double Inches { get; }

Methods

From(UnitType)

Get a double value for a specific unit

View Source
[Pure]
public readonly double From(Length.UnitType convertTo)
Returns

System.Double: the converted value

Parameters
TypeNameDescription
Meadow.Units.Length.UnitTypeconvertTounit to covert to

Equals(object)

Compare to another Length object

View Source
[Pure]
public override readonly bool Equals(object obj)
Returns

System.Boolean: true if equal

Parameters
TypeNameDescription
System.ObjectobjThe object to compare

GetHashCode()

Get hash of object

View Source
[Pure]
public override readonly int GetHashCode()
Returns

System.Int32: int32 hash value### Equals(Length) Compare to another Length object

View Source
[Pure]
public readonly bool Equals(Length other)
Returns

System.Boolean: true if equal

Parameters
TypeNameDescription
Meadow.Units.LengthotherThe object to compare

CompareTo(Length)

Compare to another Length object

View Source
[Pure]
public readonly int CompareTo(Length other)
Returns

System.Int32: 0 if equal

Parameters
TypeName
Meadow.Units.Lengthother

Abs()

Returns the absolute value of the Meadow.Units.Length

View Source
[Pure]
public readonly Length Abs()
Returns

Meadow.Units.Length

ToString()

Get a string representation of the object

View Source
[Pure]
public override readonly string ToString()
Returns

System.String: A string representing the object### ToString(string, IFormatProvider) Get a string representation of the object

View Source
[Pure]
public readonly string ToString(string format, IFormatProvider formatProvider)
Returns

System.String: A string representing the object

Parameters
TypeNameDescription
System.Stringformatformat
System.IFormatProviderformatProviderformat provider

CompareTo(object)

Compare to another Length object

View Source
[Pure]
public readonly int CompareTo(object obj)
Returns

System.Int32: 0 if equal

Parameters
TypeNameDescription
System.ObjectobjThe other Length cast to object

GetTypeCode()

Get type code of object

View Source
[Pure]
public readonly TypeCode GetTypeCode()
Returns

System.TypeCode: The TypeCode### ToBoolean(IFormatProvider) Convert to boolean

View Source
[Pure]
public readonly bool ToBoolean(IFormatProvider provider)
Returns

System.Boolean: bool representation of the object

Parameters
TypeNameDescription
System.IFormatProviderproviderformat provider

ToByte(IFormatProvider)

Convert to byte

View Source
[Pure]
public readonly byte ToByte(IFormatProvider provider)
Returns

System.Byte: byte representation of the object

Parameters
TypeNameDescription
System.IFormatProviderproviderformat provider

ToChar(IFormatProvider)

Convert to char

View Source
[Pure]
public readonly char ToChar(IFormatProvider provider)
Returns

System.Char: char representation of the object

Parameters
TypeNameDescription
System.IFormatProviderproviderformat provider

ToDateTime(IFormatProvider)

Convert to DateTime

View Source
[Pure]
public readonly DateTime ToDateTime(IFormatProvider provider)
Returns

System.DateTime: DateTime representation of the object

Parameters
TypeNameDescription
System.IFormatProviderproviderformat provider

ToDecimal(IFormatProvider)

Convert to Decimal

View Source
[Pure]
public readonly decimal ToDecimal(IFormatProvider provider)
Returns

System.Decimal: Decimal representation of the object

Parameters
TypeNameDescription
System.IFormatProviderproviderformat provider

ToDouble(IFormatProvider)

Convert to double

View Source
[Pure]
public readonly double ToDouble(IFormatProvider provider)
Returns

System.Double: double representation of the object

Parameters
TypeNameDescription
System.IFormatProviderproviderformat provider

ToInt16(IFormatProvider)

Convert to in16

View Source
[Pure]
public readonly short ToInt16(IFormatProvider provider)
Returns

System.Int16: int16 representation of the object

Parameters
TypeNameDescription
System.IFormatProviderproviderformat provider

ToInt32(IFormatProvider)

Convert to int32

View Source
[Pure]
public readonly int ToInt32(IFormatProvider provider)
Returns

System.Int32: int32 representation of the object

Parameters
TypeNameDescription
System.IFormatProviderproviderformat provider

ToInt64(IFormatProvider)

Convert to int64

View Source
[Pure]
public readonly long ToInt64(IFormatProvider provider)
Returns

System.Int64: int64 representation of the object

Parameters
TypeNameDescription
System.IFormatProviderproviderformat provider

ToSByte(IFormatProvider)

Convert to sbyte

View Source
[Pure]
public readonly sbyte ToSByte(IFormatProvider provider)
Returns

System.SByte: sbyte representation of the object

Parameters
TypeNameDescription
System.IFormatProviderproviderformat provider

ToSingle(IFormatProvider)

Convert to float

View Source
[Pure]
public readonly float ToSingle(IFormatProvider provider)
Returns

System.Single: float representation of the object

Parameters
TypeNameDescription
System.IFormatProviderproviderformat provider

ToString(IFormatProvider)

Convert to string

View Source
[Pure]
public readonly string ToString(IFormatProvider provider)
Returns

System.String: string representation of the object

Parameters
TypeNameDescription
System.IFormatProviderproviderformat provider

ToType(Type, IFormatProvider)

Convert to type

View Source
[Pure]
public readonly object ToType(Type conversionType, IFormatProvider provider)
Returns

System.Object: type representation of the object

Parameters
TypeNameDescription
System.TypeconversionTypetype to covert to
System.IFormatProviderproviderformat provider

ToUInt16(IFormatProvider)

Convert to uint16

View Source
[Pure]
public readonly ushort ToUInt16(IFormatProvider provider)
Returns

System.UInt16: uint16 representation of the object

Parameters
TypeNameDescription
System.IFormatProviderproviderformat provider

ToUInt32(IFormatProvider)

Convert to uint32

View Source
[Pure]
public readonly uint ToUInt32(IFormatProvider provider)
Returns

System.UInt32: uint32 representation of the object

Parameters
TypeNameDescription
System.IFormatProviderproviderformat provider

ToUInt64(IFormatProvider)

Convert to uint64

View Source
[Pure]
public readonly ulong ToUInt64(IFormatProvider provider)
Returns

System.UInt64: uint64 representation of the object

Parameters
TypeNameDescription
System.IFormatProviderproviderformat provider

CompareTo(double?)

Compare the default value to a double

View Source
[Pure]
public readonly int CompareTo(double? other)
Returns

System.Int32: 0 if equal

Parameters
TypeNameDescription
System.Nullable<System.Double>othervalue to compare

Equals(double?)

Compare the default value to a double

View Source
[Pure]
public readonly bool Equals(double? other)
Returns

System.Boolean: 0 if equal

Parameters
TypeNameDescription
System.Nullable<System.Double>othervalue to compare

Equals(double)

Compare the default value to a double

View Source
[Pure]
public readonly bool Equals(double other)
Returns

System.Boolean: 0 if equal

Parameters
TypeNameDescription
System.Doubleothervalue to compare

CompareTo(double)

Compare the default value to a double

View Source
[Pure]
public readonly int CompareTo(double other)
Returns

System.Int32: 0 if equal

Parameters
TypeNameDescription
System.Doubleothervalue to compare

Implements

  • System.IComparable
  • System.IFormattable
  • System.IConvertible
  • System.IEquatable<System.Double>
  • System.IComparable<System.Double>