Rss20ItemFormatter Constructor (Type)

 

Creates a new instance of the Rss20ItemFormatter class.

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

public Rss20ItemFormatter(
	Type itemTypeToCreate
)

Parameters

itemTypeToCreate
Type: System.Type

The instance derived from SyndicationItem to associate with the Rss20ItemFormatter.

Use this constructor to specify a class derived from SyndicationItem to instantiate when a syndication item is read in.

The following code shows how to use this constructor.

Rss20ItemFormatter myItemRssFormatter = new Rss20ItemFormatter(typeof(MySyndicationItem));
XmlReader rssReader = XmlReader.Create("http://Contoso/Feeds/MyFeed/Items");
myItemRssFormatter.ReadFrom(rssReader);
rssReader.Close();

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