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;
精彩评论