Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Description Property

SyndicationFeed.Description Property

Gets and sets a description of the feed.

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

public TextSyndicationContent Description { get; set; }

Property Value

Type: System.ServiceModel.Syndication.TextSyndicationContent
A TextSyndicationContent object that represents the description of the feed.

When serialized to Atom 1.0, Description is written to a <subtitle> element.

When serialized to RSS 2.0, Description is written to a <description> element.

The following code shows how to set the Description of a SyndicationFeed.

List<SyndicationItem> items = new List<SyndicationItem>();

SyndicationItem item1 = new SyndicationItem();
item1.Title = new TextSyndicationContent("Item 1");
item1.Content = SyndicationContent.CreatePlaintextContent("This is the content for Item 1");
items.Add(item1);

SyndicationItem item2 = new SyndicationItem();
item2.Title = new TextSyndicationContent("Item 2");
item2.Content = SyndicationContent.CreatePlaintextContent("This is the content for Item 2");
items.Add(item2);

SyndicationFeed feed = new SyndicationFeed(items);
feed.Description = new TextSyndicationContent("This is a feed description");

The following XML shows how Description is serialized to Atom 1.0.

<subtitle type="text">This is a sample feed</subtitle>

The following XML shows how Description is serialized to RSS 2.0.

<description>This is a sample feed</description>

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft