Esempio n. 1
0
 public Money(int amount, Money.Unit denomination)
 {
     Denomination = denomination;
     _value       = amount * Money.InternalValue(denomination);
 }
Esempio n. 2
0
        public Money ConvertTo(Money.Unit ToDenomination)
        {
            int newAmount = this.Amount * Money.InternalValue(Denomination) / Money.InternalValue(ToDenomination);

            return(new Money(newAmount, Denomination));
        }
Esempio n. 3
0
 public static int InternalValue(Money.Unit Denomination)
 {
     return(Money.BaseValue[(int)Denomination]);
 }