文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>C# ArrayList的几个操作

C# ArrayList的几个操作

时间:2010-09-20  来源:胖子黎

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Collections; namespace ConsoleApplication1 { public class MyTest : IEnumerator { public object Current { get { return null; } } public bool MoveNext() { return false; } public void Reset() { } } //这个例子是显示arraylist的。arraylist和array 相当于 stringbuilder和string的关系。但是如果要把arraylist变化成数组 //需要你手工进行复制的操作. class Program { static void Main(string[] args) { ArrayList myArrayList = new ArrayList(3); string[] yourName = new string[2]; yourName[0] = "ok"; yourName[1] = "hello"; myArrayList.Add("20"); myArrayList.Add("40"); myArrayList.Add("50"); myArrayList.Add("70"); myArrayList.Insert(1, "10"); myArrayList.AddRange(yourName); myArrayList.RemoveRange(0, (2
相关阅读 更多 +
排行榜 更多 +
步行僵尸2无限金币版

步行僵尸2无限金币版

体育竞技 下载
狐狸一号特殊任务无限金币版

狐狸一号特殊任务无限金币版

体育竞技 下载
忍者之雷复仇无限金币钻石版

忍者之雷复仇无限金币钻石版

体育竞技 下载