views:

930

answers:

3

I am learning Silverlight and WPF on my own to expand my programming base. I am following this tutorial, and I am currently stuck on part 3. I am up to the point where my application requests and receives a response from digg.com, but I cannot figure out how to properly dimension the XDocument class (as the tutorial shows) to read the xmlcontent that is retrieved.

Granted, the tutorial is in C# (which I know very little about), but I do not see why I cannot access this class. Intellisense suggested replacing XDocument with Document.Run, but that got me nowhere. I also read that this class was part of the System.Xml.Linq namespace, but even trying to dimension my variable as

Dim xS as System.Xml.Linq.XDocument

gives me nothing. Anyone know what I can do?

+1  A: 

What version of .Net/Visual Studio are you using? XDocument wasn't added to the framework until .Net 3.5.

Joel Coehoorn
+1  A: 

If I recall correctly you need to add the System.Xml.Linq dll in the project references.

AnthonyWJones
Perfect, that was exactly what I needed to do. Thanks!
Anders
A: 

As the above posters mentioned Linq is a .Net 3.5 addition.

I had a very similar problem recently trying to used linq features in what I thought was a 3.5 enabled app but my web.config was from an older project.

If you know you have 3.5 installed, try making a new project and add your code back into it.

Birk