SyndicationCategory Class
A class that represents the category of a syndication feed.
Assembly: System.ServiceModel.Web (in System.ServiceModel.Web.dll)
The following code shows how to create a SyndicationFeed and add a SyndicationItem with a SyndicationCategory.
using System; using System.ServiceModel.Syndication; using System.Collections.Generic; using System.Collections.ObjectModel; namespace SyndicationCategorySample { class Program { static void Main(string[] args) { SyndicationFeed myFeed = new SyndicationFeed("My Test Feed", "This is a test feed", new Uri("http://FeedServer/Test"), "MyFeedId", DateTime.Now); SyndicationItem myItem = new SyndicationItem("Item One Title", "Item One Content", new Uri("http://FeedServer/Test/ItemOne")); myItem.Categories.Add(new SyndicationCategory("MyCategory")); Collection<SyndicationItem> items = new Collection<SyndicationItem>(); items.Add(myItem); myFeed.Items = items; } } }
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.