最近要做一个课程设计。
Array数组值类似这样。怎么转成字符串数组?

解决方案 »

  1.   

    Array不就是数组么?
    string[,] result = new string[a.GetLength(0), a.GetLength(1)];
    for (int i = 0; i < a.GetLength(0); i++)
        for (int j = 0; j < a.GetLength(1); j++)
            result[i, j] = a[i, j];
      

  2.   

    谢谢您的回复。
    运行后a[i, j]出错无法将带 [] 的索引应用于“System.Array”类型的表达式
      

  3.   

     result[i, j] = a[i][ j];