예제 #1
0
        private decimal ConvertFromUS(BaseCurrency type, decimal USAmount)
        {
            decimal converted = 0.0M;

            converted = USAmount * type.InUS;
            return(converted);
        }
예제 #2
0
        public decimal ConvertTo(BaseCurrency type)
        {
            decimal converted = ConvertToUS();

            converted = ConvertFromUS(type, converted);
            return(converted);
        }
예제 #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);
        }
예제 #4
0
 public ConvertibleCurrency(BaseCurrency type, decimal val)
 {
     currency = type;
     amount   = val;
 }