tags:

views:

38

answers:

1

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'...?

+2  A: 

Add

using System.Linq;
SLaks
+1 Back to this.
Anthony Pegram