TableCell Table_Cell[2] =new TableCell();
Table_Cell[0].Text="11";
Table_Cell[1].Text="12";

解决方案 »

  1.   

    你没有初始化每个TableCell,应该这样:TableCell[] Table_Cell=new TableCell[2];
    Table_Cell[0]=new TableCell();
    Table_Cell[0].Text="11";
    Table_Cell[1]=new TableCell();
    Table_Cell[1].Text="12";
      

  2.   

    ms-help://MS.VSCC/MS.MSDNVS.2052/csspec/html/vclrfcsharpspec_7_5_10_2.htm
    数组创建表达式允许实例化包含数组类型的元素的数组,但必须手动初始化这类数组的元素。例如,语句int[][] a = new int[100][];
    创建一个包含 100 个 int[] 类型的元素的一维数组。每个元素的初始值为 null。