Click or drag to resize

IConversionRatioProviderExtensionsGetRatioTUnit Method

Gets the conversion ratio for convertion from the specified unit to the specified unit. Throws exception if the ratio is not available.

Namespace:  Aloe.EnterpriseOne.Model.Core.Metrics
Assembly:  Aloe.EnterpriseOne.Model (in Aloe.EnterpriseOne.Model.dll) Version: 20.1.3.5
Syntax
public static ConversionRatio GetRatio<TUnit>(
	this IConversionRatioProvider<TUnit> provider,
	TUnit sourceUnit,
	TUnit destinationUnit
)
where TUnit : IUnitOfMeasure

Parameters

provider
Type: Aloe.EnterpriseOne.Model.Core.MetricsIConversionRatioProviderTUnit
The ratio provider.
sourceUnit
Type: TUnit
From unit.
destinationUnit
Type: TUnit
To unit.

Type Parameters

TUnit
The type of the unit.

Return Value

Type: ConversionRatio
The conversion ratio between the specified units.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IConversionRatioProviderTUnit. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also