问题描述
{
str1 = System.IO.File.ReadAllText(@E:\\+ txtname.Text +。txt);
if(str1! = null)
{
lines = str1.Split(new [] {Environment.NewLine},StringSplitOptions.None);
subarray = lines [i] .Split(',');
x = subarray [0];
y = subarray [1];
}
for(i = 0; i< 10000; i ++)
{
chart1.Series [0 ] .Points.AddXY(x,y);
x =子阵列[0];
y = subarray [1];
}
}
我尝试过:
chart1.Series [0] .Points.AddXY(x,y);
值不能为null,显示上行错误....
{ str1 = System.IO.File.ReadAllText(@"E:\\" + txtname.Text + ".txt");
if (str1 != null)
{
lines = str1.Split(new[] { Environment.NewLine }, StringSplitOptions.None);
subarray = lines[i].Split(',');
x = subarray[0];
y = subarray[1];
}
for (i = 0; i < 10000; i++)
{
chart1.Series[0].Points.AddXY(x, y);
x = subarray[0];
y = subarray[1];
}
}
What I have tried:
chart1.Series[0].Points.AddXY(x, y);
Value cannot be null showing error on above line....
推荐答案
这篇关于如何使用记事本数据获取离线图表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!