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
)

Parameters

title
Type: System.String

The item title.

content
Type: System.String

The item content.

itemAlternateLink
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
Available since 3.5
Silverlight
Available since 2.0
Return to top
Show: