CurrencySetConversion 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#
public virtual 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.

Implements

ICurrencySetConversion(ICurrency, Decimal)

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) );

Exceptions

ArgumentNullExceptiontargetCurrency is null

See Also