public override Models.CalculationNode Parse(string expression)
{
var calNode = new Models.CalculationNode();
int i = expression.Length;
char[] x = expression.ToCharArray();
string temp = "";
//Backwards assembly of the tree
//Right Node
while (!IsOperator(x[i]) && i > 0)
{
if (!x[i].Equals(' ')) temp = x[i] + temp;
i--;
}
}
自從我使用過樹並且在while循環中出現越界異常之後,我已經有一段時間了。出境異常
感謝這是更清潔 – Matt 2010-05-04 20:29:57