Ejemplo n.º 1
0
 private static void CheckCurrencies(Amount lhs, Amount rhs)
 {
     if (lhs.currency != rhs.currency)
     throw new Exception("incompatible currencies");
 }
Ejemplo n.º 2
0
 protected bool Equals(Amount other)
 {
     return amount.Equals(other.amount) && currency == other.currency;
 }