这样看是不是会清楚些:
if(sort.ParentPath == "")
{
text1 = "select max(orderID) from aclass "; 
}
else
{
text1 = "select max(orderID) from aclass " +string.Concat((textArray1 = new string[5]));
}

解决方案 »

  1.   

    你查一下三元运算符a;b?c的帮助就晓得了!
      

  2.   

    这是三元运算符赋值运算,语法如下:
    <test>?<result_true>:<resutl_false>
    根据<test>值的真假返回<result_true>或<resutl_false>中的一个值,此比较可以用if代替,且可读性更好。
      

  3.   

    找到了,谢谢啦
    ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.2052/csspec/html/vclrfcsharpspec_7_12.htm?: 运算符称为条件运算符。有时,它也称为三元运算符。