RssFeed or AtomFeed

Oct 17, 2008 at 8:32 PM
I am creating AtomFeed writing AtomFeed feed = AtomFeed.Create("uri");
and creating RssFeed writing RssFeed feed = RssFeed.Create("uri");

But i need know first if the given Uri contains a RssFeed or AtomFeed and upon that i will create RssFeed object or AtonFeed object.
How can i do that ?
Oct 17, 2008 at 9:39 PM
Use the GenericSyndicationFeed class to read syndication feeds that you do not know the format for upfront. Alternately, there are some discovery class in the Common namespace that will allow you to determine the syndication format for a given URL.