开发者

why doesn't XElement have a ToDictionary linq expression?

For some reason ToDictionary isn't working.

开发者_如何学运维I am using vs.net 2010 and 4.0

XElement root = XElement.Load(fullPathToXml);            
IEnumerable<XElement> nodes = root.Elements("root");

var dic = nodes.ToDictionary(...)

I want to convert it to a dictionary<string,string>

it says there is no defintion for 'ToDictionary'...?


Add

using System.Linq;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜