public Money(int amount, Money.Unit denomination) { Denomination = denomination; _value = amount * Money.InternalValue(denomination); }
public Money ConvertTo(Money.Unit ToDenomination) { int newAmount = this.Amount * Money.InternalValue(Denomination) / Money.InternalValue(ToDenomination); return(new Money(newAmount, Denomination)); }
public static int InternalValue(Money.Unit Denomination) { return(Money.BaseValue[(int)Denomination]); }