private decimal ConvertFromUS(BaseCurrency type, decimal USAmount) { decimal converted = 0.0M; converted = USAmount * type.InUS; return(converted); }
public decimal ConvertTo(BaseCurrency type) { decimal converted = ConvertToUS(); converted = ConvertFromUS(type, converted); return(converted); }
public static decimal CurrencyConvert(decimal amount, BaseCurrency fromCur, BaseCurrency toCur) { decimal converted = 0.0M; ConvertibleCurrency currency = new ConvertibleCurrency(fromCur, amount); converted = currency.ConvertTo(toCur); return(converted); }
public ConvertibleCurrency(BaseCurrency type, decimal val) { currency = type; amount = val; }