Description
Converts the specified quantity value from a given unit to another unit.
Syntax
[Visual Basic .NET] |
---|
Public Function ConvertQuantity( _
ByVal DimensionName As String, _
ByVal FromUnit As String, _
ByVal ToUnit As String, _
ByVal FromValue As Double _
) As Double
|
Parameters
See Also
Example
Convert a quantity unit to another unit
[C#] |
---|
IAgConversionUtility converter = root.ConversionUtility;
// Old value in miles, new value in km
double newValue = converter.ConvertQuantity("DistanceUnit", "mi", "km", 1.0);
|
|
Convert a quantity unit to another unit
[Visual Basic .NET] |
---|
Dim converter As IAgConversionUtility = root.ConversionUtility
' Old value in miles, new value in km
Dim newValue As Double = converter.ConvertQuantity("DistanceUnit", "mi", "km", 1)
|
|