private static bool BinaryOp(Preis x, Preis y, Func <decimal, decimal, bool> op) { if (object.ReferenceEquals(x, null) || object.ReferenceEquals(y, null)) { throw new ArgumentNullException(); } if (x.Unit == y.Unit) { return(op(x.Amount, y.Amount)); } return(op(x.Amount, y.ConvertTo(x.Unit).Amount)); }