-2

我有以下代码,并在启动器中添加了一个数组:

  var GraphList = new List<object>{
  new []{ "Year", "Sales", "Expenses"},
  new []{ "2010", "2012", "2001" },
  new []{ "80", "100", "200"}

如何不使用构造函数添加新数组,即

GraphList.Add.new []{ "80", "100", "200"};
4

2 回答 2

4

这应该有效(我认为这GraphList在范围内):

GraphList.Add(new []{ "80", "100", "200"});
于 2012-07-08T11:05:09.813 回答
4
GraphList.Add(new[] { "80", "100", "200" });
于 2012-07-08T11:05:36.990 回答