码迷,mamicode.com
首页 > Windows程序 > 详细

C#之ArrayList

时间:2016-10-22 11:43:10      阅读:163      评论:0      收藏:0      [点我收藏+]

标签:each   count   log   font   元素   add   debug   for   foreach   

using System.Collections;

 

新建:

ArrayList list = new ArrayList(); 

 

添加元素:

 

int a = 1;

list.Add(a);

 

遍历:

foreach(int a in list){

  Debug.Log(a);

}

 

统计长度:

Debug.Log (list.Count);

C#之ArrayList

标签:each   count   log   font   元素   add   debug   for   foreach   

原文地址:http://www.cnblogs.com/huangshiyu13/p/5987032.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!