Click or drag to resize
CurrencyConverter Class
Static wrapper for currency conversion service.
Inheritance Hierarchy
SystemObject
  CMS.EcommerceCurrencyConverter

Namespace: CMS.Ecommerce
Assembly: CMS.Ecommerce (in CMS.Ecommerce.dll) Version: 10.0.0
Syntax
C#
public static class CurrencyConverter

The CurrencyConverter type exposes the following members.

Methods
  NameDescription
Public methodStatic memberApplyExchangeRate
Applies given exchange rate to monetary amount. If rate is negative or zero, amount is returned with no change.
Public methodStatic memberConvert(Decimal, Boolean, String, Int32)
Converts given monetary amount expressed main currency to different currency using site specific conversion.
Public methodStatic memberConvert(Decimal, String, String, Int32)
Converts given monetary amount expressed in one currency to another currency using site specific conversion.
Public methodStatic memberGetExchangeRate(Boolean, String, Int32)
Calculates exchange rate for conversion from main currency to different currency. Example: if 1 USD = 16 CZK then this method returns 1/16 = 0.0625 for conversion from USD to CZK.
Public methodStatic memberGetExchangeRate(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.
Public methodStatic memberTryGetExchangeRate(Boolean, String, Int32, Decimal)
Calculates exchange rate for conversion from main currency to different currency. Example: if 1 USD = 16 CZK then this method returns 1/16 = 0.0625 for conversion from USD to CZK. All exceptions are logged into event log.
Public methodStatic memberTryGetExchangeRate(String, String, Int32, Decimal)
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. All exceptions are logged into event log.
Top
See Also