public virtual bool Validate(IBanknote banknote) { if (_nextHandler != null && _nextHandler.Validate(banknote)) { return(true); } else { if (_nextHandler == null) { Console.WriteLine(); } return(false); } }
public bool Validate(IBanknote banknote) { Console.Write($"{banknote.value_} {banknote.sign} ="); return(_handler.Validate(banknote)); }