Click or drag to resize
ICurrencyConverterGetExchangeRate Method
Returns exchange rate for conversion from one currency to another. Example: if 1 USD = 16 CZK then this method returns 1/16 = 0.0625 for conversion from USD to CZK.

Namespace: CMS.Ecommerce
Assembly: CMS.Ecommerce (in CMS.Ecommerce.dll) Version: 13.0.131
Syntax
C#
decimal GetExchangeRate(
	string fromCurrencyCode,
	string toCurrencyCode
)

Parameters

fromCurrencyCode
Type: SystemString
Code of currency in which amount is expressed, e.g. USD, EUR.
toCurrencyCode
Type: SystemString
Code of currency to convert amount to, e.g. USD, EUR.

Return Value

Type: Decimal
Exceptions
ExceptionCondition
ArgumentExceptionThrown when currency with given code does not exist in the system.
InvalidCurrencyConversionExceptionThrown when conversion fails (e.g. exchange rate not found).
See Also