第一个问题:我是从数据库读值 所以不知道数组的长度 这样能创建数组吗 应该不行吧 我用的都是ArrayList
第二个问题:我知道了二维数组中第一维的个数 第二维个数是动态的 这样能创建吗  要是不能怎么解决呢 ArrayList貌似就是个一维动态数组 没法解决二维的问题啊

解决方案 »

  1.   

    List<int[]> lst=new List<int[]>();
    这样就是一个动态的二维数组
      

  2.   

    赋值:
    lst.Add(new int[]{1,2,3});
    lst.Add(new int[]{1,2,3,4,5});
    lst.Add(new int[]{3,4,5});
    ...提取:
    int []first=lst[0];
    int []second=lst[1];
    int []third=lst[2];
    ...
      

  3.   

    更改赋值:
    lst[0]=new int[]{11,22,33};
      

  4.   

    真复杂 我没弄懂泛型呢 
    string数组 有动态的么
      

  5.   

    List<string[]> lst=new List<string[]>();
    跟int数组类似
      

  6.   

    int[,]  二维数组
    int[][] 交错数组
    List<T> 泛型
      

  7.   

    你先研究明白,
    1.string
    2.string[]
    3.list<string>
    这个自然明白list<string[]>