C# ArrayList 怎样创建实例?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;
namespace ArrayList
{
class Program
{
static void Main(string[] args)
{
ArrayList listarray = new ArrayList();
int n = 5;
char[] temp_char = new char[n];
for (int i = 65; i < 65 + n; i++)
{
for (int j = 0; j < n; j++)
{
temp_char[j] = Convert.ToChar(j + i);
}
listarray.Add(temp_char);
}
Console.WriteLine(listarray.Count);
foreach (char[] m in listarray)
{
Console.WriteLine(m);
}
}
}
}
编译的时候显示: ArrayList是“命名空间”,不能被当做类型使用
这个问题怎么解决? 在线=答案
各位大侠,拜托,拜托了