当前上下文中不存在 ConvertCsvToXml
private void button2_Click(object sender, EventArgs e)
{
//read in file data and calculate record number
string csv = File.ReadAllText("File-Path");
int testing = 1;
XDocument doc = ConvertCsvToXml(csv, new[] { "\t" });
//create array of record number
WebService.Function[] xxx = new WebService.Function[1];
recordAmount = 0;
您好,由于某种原因,在上面的代码中,ConvertCsvToXml 行返回一个异常,表示它不存在,而智能感知在输入 XDocument 后什么也没有显示。
我可以做什么来解决这个问题?除此之外,我的代码没有任何错误!
感谢您抽出时间。
private void button2_Click(object sender, EventArgs e)
{
//read in file data and calculate record number
string csv = File.ReadAllText("File-Path");
int testing = 1;
XDocument doc = ConvertCsvToXml(csv, new[] { "\t" });
//create array of record number
WebService.Function[] xxx = new WebService.Function[1];
recordAmount = 0;
Hi there for some reason in the above code the ConvertCsvToXml line is bringing back an exception saying it does not exist, and the intelisense brings up nothing after typing XDocument.
What can I do to resolve this? There are no errors in my code other than this!
Thanks for your time.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您必须在与button2_Click 方法相同的类中定义ConvertCsvToXml 方法。
You'll have to define the ConvertCsvToXml method in the same class as the button2_Click method.