public static IList<string> strlist = null;
public IList<string> setArray(string str)
{
strlist.Add(str);
return strlist;
}
public IList<string> getArray()
{
IList<string> rtn = strlist;
strlist.Clear();
return rtn;
}
private void button1_Click(object sender, EventArgs e)
{
setArray("a");
}
我想问一下为什么strlist.Add(str);的时候会报错,不能存字符串到里面去吗?
慕容3067478