Click or drag to resize
ExchangeRateInfoProviderGetLastExchangeRateInternal Method
Returns valid exchange rate between main currency of the specified site and currency specified by currencyID or last invalid exchange rate if no valid rate found. Throws an exception when currency or exchange rate not found.

Namespace: CMS.Ecommerce
Assembly: CMS.Ecommerce (in CMS.Ecommerce.dll) Version: 9.0.0
Syntax
C#
protected virtual double GetLastExchangeRateInternal(
	int currencyId,
	int siteId,
	bool fromGlobal
)

Parameters

currencyId
Type: SystemInt32
ID of the currency to which we want exchange
siteId
Type: SystemInt32
ID of the site for which the exchange rate should be returned
fromGlobal
Type: SystemBoolean
If set to true, exchange rate between global main currency and specified site currency is calculated and returned. Has effect only when converting to site currency

Return Value

Type: Double
Exceptions
ExceptionCondition
ArgumentExceptionThrown when currency with given code does not exist in the system.
InvalidCurrencyConversionExceptionThrown when trying to convert currencies among different sites.
See Also