public bool Equals() { bool success = Decimal.TryParse(CurrentCalc, out decimal valueToInput); if (success) { HistoryCalc.Add(new Number(valueToInput, Operator.Equals)); CurrentCalc = this.CalculateHistory(); return(true); } return(false); }
public bool Division() { bool success = Decimal.TryParse(CurrentCalc, out decimal valueToInput); if (success) { CurrentCalc = "0"; HistoryCalc.Add(new Number(valueToInput, Operator.Division)); return(true); } return(false); }