Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否有人如何使用 for 循环创建 n(例如 n = 10000)个数组,每个数组都有自己的索引? Array[,] number 1 Array[,] number 2 Array[,] number 3 。 . . 我试过这段代码:
for (i=1;i<=10000;i++) { // create 2-dim array with index i }
您可以制作一个 (2d) 数组的数组。
int [][,] data = new int[10000][,]; for (int i = 0; i < data.Length; i++) data[i] = new int[2,2]; data[z][x,y] = 123;