本文介绍了如何在对象中存储xmlnode值.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的问题是:
foreach(DOC.SelectNodes("/AppBuilderProject/AppBuilderForms/AppBuilderForm/Title")中的XmlNode节点)
{
project.forms = node.innertext;
}
它会产生错误:
无法将类型字符串隐式转换为system.collection.arraylist
my question is :
foreach (XmlNode node in DOC.SelectNodes("/AppBuilderProject/AppBuilderForms/AppBuilderForm/Title"))
{
project.forms = node.innertext;
}
it generate error:
cannot implicity convert type string to system.collection.arraylist
推荐答案
int i;
foreach (XmlNode node in DOC.SelectNodes("/AppBuilderProject/AppBuilderForms/AppBuilderForm/Title"))
{
project.forms[i] = node.innertext;
i++;
}
希望对您有帮助
Milind
Hope that helps
Milind
foreach (XmlNodeList nodelist in DOC.SelectNodes("/AppBuilderProject/AppBuilderForms/AppBuilderForm/Title"))
{
foreach(XmlNode node in nodelist)
{
project.forms = node.innertext;
}
}
这篇关于如何在对象中存储xmlnode值.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!