Exemplo n.º 1
0
        private decimal ConvertFromUS(BaseCurrency type, decimal USAmount)
        {
            decimal converted = 0.0M;

            converted = USAmount * type.InUS;
            return(converted);
        }
Exemplo n.º 2
0
        public decimal ConvertTo(BaseCurrency type)
        {
            decimal converted = ConvertToUS();

            converted = ConvertFromUS(type, converted);
            return(converted);
        }
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 4
0
 public ConvertibleCurrency(BaseCurrency type, decimal val)
 {
     currency = type;
     amount   = val;
 }