用ArrayList组成的数组为什么显示“未将对象引用设置到对象的实例”的错误?
如下程序,可以通过编译,但运行时出现“为将对象引用设置到对象的实例”.不知该如何修改才可正常运行?
using System;
using System.Collections;
using System.IO;
class Class1
{
static void Main(string[] args)
{
ArrayList[] k=new ArrayList[12];
k[0].Add("string");
}
}