您的位置:首页 > 其它

如何把一个 Array 复制到 ArrayList 里?

2013-04-22 17:53 295 查看
View Code

using System;
using System.Collections;
namespace CatMouseMaster
{
class Program
{
static void Main(string[] args)
{
string[] array = { "2345" };
ArrayList arraylist = new ArrayList();
for (int i = 0; i < array.Length; i++)
{
arraylist.Add(array.GetValue(i));
}

for (int i = 0; i < arraylist.Count; i++)
{
Console.Write(arraylist[i]);
}
}
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: