C#之ArrayList

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);

 

清空:

list.Clear();

posted @ 2016-10-22 10:57  Shiyu_Huang  阅读(170)  评论(0)    收藏  举报