ICurrencySetConversion Method

Adds a conversion factor to use when converting from the current currency to the current currency.

Definition

Namespace: InnerDrive.Financial
Assembly: InnerDrive.Financial (in InnerDrive.Financial.dll) Version: 5.2.9017.0
C#
void SetConversion(
	ICurrency targetCurrency,
	decimal value
)

Parameters

targetCurrency  ICurrency
The currency type to which this conversion factor applies.
value  Decimal
The factor by which to multiply values denominated in this currency to obtain values denominated in the target currency.

Remarks

For example, assume that GB£1.00 = US$1.50. You would do the following:
C#
ICurrency dollars = new USDollar();
ICurrency pounds  = new GBPound();

dollars.SetConversion(pounds, 1.5M);
pounds.SetConversion(dollars, (1M / 1.5M) );

Implementations of ICurrency.SetConversion(ICurrency,decimal) must not set the conversion factors recursively. However, overloaded implementations may do so.

See Also