private void replaceTokensWithResult(List<MathToken> tokens, int indexOfOperator, int result) { tokens[indexOfOperator - 1] = new MathNumber(result.ToString()); tokens.RemoveAt(indexOfOperator); tokens.RemoveAt(indexOfOperator); }
private void replaceTokensWithResult(List <MathToken> tokens, int indexOfOperator, int result) { tokens[indexOfOperator - 1] = new MathNumber(result.ToString()); tokens.RemoveAt(indexOfOperator); tokens.RemoveAt(indexOfOperator); }