2012年3月31日

兩數組類型之間的區別(1)

摘要: 这里主要说明 [,]与[][] 之间的区别: int[,] a = {{ 1, 3 },{2,0},{2,6}}; /*int[,] b = { { 1, 3,2 }, { 2, 0 }, { 2, 6 } };*/ MessageBox.Show(a[0,0].ToString()); int[][] arr = new int[3][] { new int[] { 1, 2 }, new int[] { 1, 2, 3 }, new int[] { 1, 2, 3 } }; /*int[][] arr2 = new int[3][]; arr2[0][1] = 1; arr2[0][2]. 阅读全文

posted @ 2012-03-31 17:05 Mayvar 阅读(832) 评论(0) 推荐(0) 编辑

导航