PostfixNotation.PostfixNotation.OperationProcess C# (CSharp) Method

OperationProcess() private method

private OperationProcess ( string function, int i ) : string
function string
i int
return string
        private string OperationProcess(string function, int i)
        {
            if (function[i] == '(')
            {
                operationStack.Push(function[i].ToString());
            }
            else if (function[i] == ')')
            {

                while (operationStack.Peek() != "(")
                {
                    postfixNotation = postfixNotation + operationStack.Pop() + " ";
                }
                operationStack.Pop();
            }
            else
            {
                if (operationStack.Count != 0)
                {
                    while ((operationStack.Count != 0) && (GetPriority(operationStack.Peek()) >= GetPriority(function[i].ToString())))
                    {
                        postfixNotation = postfixNotation + operationStack.Pop() + " ";
                    }
                }
                operationStack.Push(function[i].ToString());
            }
            return postfixNotation;
        }