TeeChart数组问题
Steema.TeeChart.TChart [] chartList = new Steema.TeeChart.TChart[10];
int counter = 0;
InitializeComponent();
for (counter = 0; counter < 10; counter++ )
{
Console.WriteLine(chartList[counter].Location);
}
为什么会报chartList[counter]空指针错误
------解决方案--------------------
你只是声明了Steema.TeeChart.TChart的数组,但是数组中每一个chart要单独创建
Steema.TeeChart.TChart[0] = new Steema.TeeChart.TChart();
......