本文介绍了如何使用记事本数据获取离线图表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

{
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....

推荐答案


这篇关于如何使用记事本数据获取离线图表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-23 16:22