SyndicationFeed.Id Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets and sets the ID of the feed.

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

public string Id { get; set; }

Property Value

Type: System.String

The ID of the feed.

When serialized to Atom 1.0, the Id is written to an <id> element.

When serialized to RSS 2.0, the Id is written to an <a10:id> element.

The following code shows how to set the Id property on a SyndicationFeed instance.

SyndicationFeed feed = new SyndicationFeed("Feed Title", "Feed Description", new Uri("http://Feed/Alternate/Link"), "FeedID", DateTime.Now);
feed.Id = "SyndicationFeedId";

The following XML shows how the Id property is serialized to Atom 1.0.

<id>FeedID</id>

The following XML shows how the Id property is serialized to RSS 2.0.

<a10:id>FeedID</a10:id>

.NET Framework
Available since 3.5
Silverlight
Available since 2.0
Return to top
Show: