편집

다음을 통해 공유


SyndicationLink.Title Property

Definition

Gets or sets the title of the linked resource.

public:
 property System::String ^ Title { System::String ^ get(); void set(System::String ^ value); };
public string Title { get; set; }
member this.Title : string with get, set
Public Property Title As String

Property Value

The title of the linked resource.

Examples

The following code shows how to set the title of a syndication link.

SyndicationFeed feed = new SyndicationFeed("Feed Title", "Feed Description", new Uri("http://Feed/Alternate/Link"), "FeedID", DateTime.Now);

SyndicationLink link = new SyndicationLink(new Uri("http://server/link"), "alternate", "Link Title", "text/html", 1000);
feed.Links.Add(link);
Dim feed As SyndicationFeed = New SyndicationFeed("Feed Title", "Feed Description", New Uri("http://Feed/Alternate/Link"), "FeedID", DateTime.Now)

Dim link As SyndicationLink = New SyndicationLink(New Uri("http://server/link"), "alternate", "Link Title", "text/html", 1000)
feed.Links.Add(link)

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

<link customAttribute="value" rel="alternate" type="text/html" title="Link Title" length="1000" href="http://server/link" />

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

<a10:link customAttribute="value" rel="alternate" type="text/html" title="Link Title" length="1000" href="http://server/link" />

Remarks

When serialized to Atom 1.0 this value is written out as the title attribute in the <link> element.

When serialized to RSS 2.0 the title is written out as the title attribute in the <a10:link> element.

Applies to