예제 #1
0
파일: Price.cs 프로젝트: ZerOne10/oom
 private static bool BinaryOp(Price x, Price 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);
 }