Пример #1
0
 public bool Equals(Term other) =>
 SignedCoefficient.Equals(other.SignedCoefficient) &&
 ((this.Constant && other.Constant) || (!this.Constant && !other.Constant && this.Variable.Value.Equals(other.Variable.Value)));
Пример #2
0
 public override string ToString()
 {
     return(Variable.HasValue ?
            string.Format("{0}{1}", SignedCoefficient.ToString(), Variable) :
            string.Format("{0}", SignedCoefficient.ToString()));
 }