This documentation is archived and is not being maintained.

Rss20ItemFormatter Constructor (Type)

Creates a new instance of the Rss20ItemFormatter class.

Namespace:  System.ServiceModel.Syndication
Assembly:  System.ServiceModel.Web (in System.ServiceModel.Web.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();

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

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

.NET Framework

Supported in: 3.5
Show: