CurrencyConverter.GetExchangeRate Method (String, String, Int32) |
Calculates 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.EcommerceAssembly: CMS.Ecommerce (in CMS.Ecommerce.dll) Version: 10.0.0
Syntax public static decimal GetExchangeRate(
string fromCurrencyCode,
string toCurrencyCode,
int siteID
)
Parameters
- fromCurrencyCode
- Type: System.String
Code of currency in which amount is expressed, e.g. USD, EUR. - toCurrencyCode
- Type: System.String
Code of currency to convert amount to, e.g. USD, EUR. - siteID
- Type: System.Int32
ID of the site for which the rate is calculated.
Return Value
Type:
DecimalExchange rate from one currency to another currency on specific site.
Exceptions See Also