Skip to main content

QuantityValue<T>.Value Property

Gets or sets a numerical value of the quantity expressed in the base measurement unit of the specified type.

Namespace: DevExpress.UnitConversion

Assembly: DevExpress.Docs.v23.2.dll

NuGet Package: DevExpress.Document.Processor

Declaration

public double Value { get; set; }

Property Value

Type Description
Double

A Double value of the quantity.

Remarks

The Value gets or sets a value in the base measurement unit, i.e., the first unit in the inner conversion table. To use the quantity values correctly, set the numerical value using one of the extension functions as illustrated in the following code snippet:

using DevExpress.UnitConversion;
//...
// The height is 5'4".
QuantityValue<Distance> height = (5.0).Feet() + (4.0).Inches();
string s = String.Format("The height is {0} ells or {1} meters.",
    height.ToElls().Value.ToString("g3"), height.ToMeters().Value.ToString("g3"));
MessageBox.Show(s);
See Also