比如ds.Tables[0].Rows[i]这样能转化为字符串数组吗?请教

解决方案 »

  1.   

    ds.Tables[0].Rows[i][1].Tostring().Split(...);
      

  2.   


            string tempStr = "j,1, ,c,6,9";
            string[] arrayStr = tempStr.Split(',');
      

  3.   

    // maybe ->object[] o_columnVallues =ds.Tables[0].Rows[<<rowIndex>>].ItemArray();
    string[] columnValues = new string[o_columnValues.length];
    for(int i = 0; i < o_columnValues.Lenth; i++) {
    columnValues[i] = o_columnvalues[i].ToString();
    }
      

  4.   

    假如原类型就是 string 直接使用Array.ConvertAll(o_columnVallue, columnVallue);