XElement xxcc = XElement.Load("信息存储.xml");
IEnumerable<XElement> elements = from ele in xxcc.Elements("root")//无法引用非静态变量
select ele;
string text = from t in xxcc.Descendants("conf");
出现了错误
c#的 linq to xml问题
- 写回答
- 好问题 0 提建议
- 追加酬金
- 关注问题
- 邀请回答
-
1条回答 默认 最新
- threenewbee 2017-04-21 14:11关注
string text = from t in xxcc.Descendants("conf");
->
string text = (from t in xxcc.Descendants("conf") select t).First().ToString();解决 无用评论 打赏 举报