SyndicationItem.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 syndication item.

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 syndication item.

When serialized to Atom 1.0, this property is written to the <id> element. When serialized to RSS 2.0, this property is written to the <guid> element.

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

SyndicationItem item = new SyndicationItem("Item Title", "Item Content", new Uri("http://Item/Alternate/Link"));
item.Id = "ItemID";

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

<id>Item ID</id>

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

<guid isPermaLink="false">Item ID</guid>

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