bladdoctor
Mrk傻瓜
2019-06-08 16:51
采纳率: 60%
浏览 419

C#里面如何创建很多同类型的数组

我是像下面一样弄得,如何简化呀大佬们,嘤嘤嘤
//ArrayList alist2 = new ArrayList();
//ArrayList alist3 = new ArrayList();
//ArrayList alist4 = new ArrayList();
//ArrayList alist5 = new ArrayList();
//ArrayList alist6 = new ArrayList();
//ArrayList alist7 = new ArrayList();
//ArrayList alist8 = new ArrayList();
//ArrayList alist9 = new ArrayList();
//ArrayList alist10 = new ArrayList();

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • caozhy
    已采纳

    ArrayList[] lists = new ArrayList[10];
    for (int i = 0; i < 10; i++)
    lists[i] = new ArrayList();

    点赞 评论

相关推荐