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