using System; namespace abc.e.f//等價於下面分層嵌套的寫法。且這種寫法不管命名空間abc有沒有定義過,也不管命名空間e有沒有定義過 { class MYTestX { static void Main(string[] args) { int[,] matrix = new int[2, 5];//多維數組。只是從維度上增加,並不是數組嵌套。有點像多維矩陣 int[][] mt1 = new int[2][];//數組的數組,有兩個元素,每個元素是一個數組。相當於嵌套數組。有點像二叉鏈表 mt1[0] = new int[5]; mt1[1] = new int[4]; int[,,,] mt = new int[2, 3,4, 5];//數組的數組,多重嵌套數組。 } } }