public override string ToString() { String s = ""; foreach (KeyValuePair <int, decimal> pair in payments) { if (pair.Value != 0) { s += pair.Value + " " + CurrentTypes.getType(pair.Key) + "\n"; } } return(s); }
public override string ToString() => (currencyType != -1) ? value + " " + CurrentTypes.getType(currencyType) : "Unadditional values";
public Money(decimal value, int currencyType) { this.value = value; this.currencyType = (CurrentTypes.getType(currencyType) != null) ? currencyType : -1; }