public CalcResult <T> Subtract(T a) { if (IsValid) { try { _value = Arithmetic <T> .Subtract(_value, a); } catch (Exception e) { Message = e.Message; IsValid = false; } } return(this); }
public CalcResult <T> Subtract(CalcResult <T> cr) { if (IsValid) { if (cr.IsValid) { try { _value = Arithmetic <T> .Subtract(_value, cr._value); } catch (Exception e) { Message = e.Message; IsValid = false; } } else { return(cr); } } return(this); }
public static T Subtract <T>(T x, T y) => Arithmetic <T> .Subtract(x, y);