Export (0) Print
Expand All

SyndicationItem Constructor (String, String, Uri)

Initializes a new instance of the SyndicationItem class with the specified title, content, and link.

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

public SyndicationItem(
	string title,
	string content,
	Uri itemAlternateLink


Type: System.String

The item title.

Type: System.String

The item content.

Type: System.Uri

The item URL.

The following example shows how to call this constructor.

SyndicationItem item = new SyndicationItem("My Item", "This is some content", new Uri("http://SomeServer/MyItem"));
item.Authors.Add(new SyndicationPerson("jesper@contoso.com", "Jesper Aaberg", "http://contoso/jesper"));
item.Categories.Add(new SyndicationCategory("Category One"));
item.Contributors.Add(new SyndicationPerson("lene@contoso.com", "Lene Aaling", "http://contoso/lene"));
item.Copyright = new TextSyndicationContent("Copyright 2007");
item.Links.Add(new SyndicationLink(new Uri("http://OtherServer/Item"), "alternate", "Alternate Link", "text/html", 1000));
item.PublishDate = new DateTime(2007, 2, 23);
item.Summary = new TextSyndicationContent("this is a summary for my item");

.NET Framework

Supported in: 4.5, 4, 3.5

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

© 2014 Microsoft