int[, ,] array3D = new int[,,] { { { 1, 2, 3 } }, { { 4, 5, 6 } } };
Console.WriteLine("The elements of the 3 dimensional array are
{0} {1} {2} {3} {4} {5}.",
array3D[0][0][0],
array3D[0][0][1],
array3D[0][1][0],
array3D[0][1][1],
array3D[0][2][0],
array3D[0][2][1]);
编译时,提示如下error:
[] 内索引数错误,应为“3”点击错误时,提示指向了第二维索引
Console.WriteLine("The elements of the 3 dimensional array are
{0} {1} {2} {3} {4} {5}.",
array3D[0][0][0],
array3D[0][0][1],
array3D[0][1][0],
array3D[0][1][1],
array3D[0][2][0],
array3D[0][2][1]);
编译时,提示如下error:
[] 内索引数错误,应为“3”点击错误时,提示指向了第二维索引
*****************************************************************************
欢迎使用CSDN论坛专用阅读器 : CSDN Reader(附全部源代码) 最新版本:20070212http://www.cnblogs.com/feiyun0112/archive/2006/09/20/509783.html
array3D[0,0,0]=1;
array3D[0,0,1]=2;
......
int[] a = new int[] ----错误
int[] a = new int[3] ---正确
正确:The length of the first dimension is 2
The length of the second dimension is 1
The length of the first dimension is 3int[,,] array3D = new int[2,1,3] { { { 1, 2, 3 } }, { { 4, 5, 6 } } };
Console.WriteLine("The elements of the 3 dimensional array are :
{0} {1} {2} {3} {4} {5}.",
array3D[0,0,0],
array3D[0,0,1],
array3D[0,0,2],
array3D[1,0,0],
array3D[1,0,1],
array3D[1,0,2]);
请大家放心,上面的代码已运行通过!!!
但表达的主要意识就是:"数组变量需要提前定义好个数".
请问怎么样导入dxf格式的三维数据呢??