Click or drag to resize
ICurrencyConverterServiceTryGetExchangeRate Method (String, String, Int32, Decimal)
Calculates exchange rate for conversion from one currency to another.

Namespace: CMS.Ecommerce
Assembly: CMS.Ecommerce (in CMS.Ecommerce.dll) Version: 13.0.131
Syntax
C#
bool TryGetExchangeRate(
	string fromCurrencyCode,
	string toCurrencyCode,
	int siteID,
	ref decimal rate
)

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.
siteID
Type: SystemInt32
ID of the site for which the rate is calculated.
rate
Type: SystemDecimal
When this method returns, contains exchange rate from one currency to another currency on specific site.

Return Value

Type: Boolean
True if exchange rate was obtained successfully; otherwise, false.
See Also