Search code examples
c#.netxmlrsssyndication-feed

How do I use SyndicationFeed?


This may seem like a dumb question, but I cannot for the life of me figure out how to get access to the SyndicationFeed class in c#. Every single example I have seen on MSDN or otherwise assumes that it's already imported, and not a single one I have found gives any indication on where it's located.

For example, I'm trying to run the following:

XmlReader reader = XmlReader.Create(rss_url);
SyndicationFeed.Load(reader);

But it fails because SyndicationFeed doesn't exist in the current context. Does anybody out there know how I can get it in?


Solution

  • Read the documentation more carefully:

    Namespace: System.ServiceModel.Syndication
    Assembly: System.ServiceModel (in System.ServiceModel.dll)

    Right-click your project, click Add Reference, then select System.ServiceModel.dll