public CExpressionEvaluator(String InfixExpression) { m_PostfixEvalStack = new Stack(); m_InfixToPostfix = new CInToPostfix(); EvaluateExpression(m_InfixToPostfix.ConvertToPostfix(new StringBuilder(InfixExpression))); }
static void Main(string[] args) { CExpressionEvaluator Expr = new CExpressionEvaluator("(6 + 2) * 5 - 8 / 4"); CInToPostfix Expression = new CInToPostfix(); Console.WriteLine(Expression.ConvertToPostfix(new StringBuilder("(65 + 232) * 543 - 8 / 4223"))); }