日期:2014-05-18  浏览次数:20721 次

C#中如何定一个二维数组
如果要定义一个10行10列的二维数组,
该如何定义?

------解决方案--------------------
int[,] i = new int[10,10];
------解决方案--------------------
string [,] ss = new string[10,10];
------解决方案--------------------
二维数组比如 int[,] nTest = new int[10,10];
交错数组比如 int[][] nTest1 = new int[5][];
nTest1[0] = new int[5];
nTest1[1] = new int[6];
nTest1[2] = new int[3];
nTest1[3] = new int[8];