Reputation: 12560
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, 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?
Upvotes: 0
Views: 1665
Reputation: 2183
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.
Upvotes: 0
Reputation: 189495
If I recall correctly you need to add the System.Xml.Linq dll in the project references.
Upvotes: 1
Reputation: 416039
What version of .Net/Visual Studio are you using? XDocument wasn't added to the framework until .Net 3.5.
Upvotes: 1