Class DoubleUnit
Double value and its unit.
Inherited Members
Namespace: DRIT.Document.Office
Assembly: DRIT.Document.dll
Syntax
public class DoubleUnit
Constructors
DoubleUnit(double, MeasurementUnit)
Initializes a unit value with the specified numeric value and measurement unit.
Declaration
public DoubleUnit(double value, MeasurementUnit unit)
Parameters
| Type | Name | Description |
|---|---|---|
| double | value | The numeric value to store. |
| MeasurementUnit | unit | The measurement unit associated with |
Properties
this[MeasurementUnit]
Gets this[measurement unit].
Declaration
public double this[MeasurementUnit unit] { get; }
Parameters
| Type | Name | Description |
|---|---|---|
| MeasurementUnit | unit |
Property Value
| Type | Description |
|---|---|
| double |
Unit
Gets or sets unit.
Declaration
public MeasurementUnit Unit { get; set; }
Property Value
| Type | Description |
|---|---|
| MeasurementUnit |
Value
Gets or sets value.
Declaration
public double Value { get; set; }
Property Value
| Type | Description |
|---|---|
| double |
Methods
GetValue(MeasurementUnit)
Returns the requested value.
Declaration
public double GetValue(MeasurementUnit unit)
Parameters
| Type | Name | Description |
|---|---|---|
| MeasurementUnit | unit | The unit used by the operation. |
Returns
| Type | Description |
|---|---|
| double | The resulting value. |
GetValue(MeasurementUnit, UnitConversionOptions)
Returns the requested value.
Declaration
public double GetValue(MeasurementUnit unit, UnitConversionOptions options)
Parameters
| Type | Name | Description |
|---|---|---|
| MeasurementUnit | unit | The unit used by the operation. |
| UnitConversionOptions | options | Options that control the operation. |
Returns
| Type | Description |
|---|---|
| double | The resulting value. |
TryGetValue(MeasurementUnit, UnitConversionOptions, out double)
Attempts to get Value and reports whether the operation succeeded.
Declaration
public bool TryGetValue(MeasurementUnit unit, UnitConversionOptions options, out double value)
Parameters
| Type | Name | Description |
|---|---|---|
| MeasurementUnit | unit | The unit used by the operation. |
| UnitConversionOptions | options | Options that control the operation. |
| double | value | The value to use for the operation. |
Returns
| Type | Description |
|---|---|
| bool | The resulting value. |
TryGetValue(MeasurementUnit, out double)
Attempts to get Value and reports whether the operation succeeded.
Declaration
public bool TryGetValue(MeasurementUnit unit, out double value)
Parameters
| Type | Name | Description |
|---|---|---|
| MeasurementUnit | unit | The unit used by the operation. |
| double | value | The value to use for the operation. |
Returns
| Type | Description |
|---|---|
| bool | The resulting value. |