Share via


SyndicationFeed.Generator 屬性

定義

取得或設定摘要的產生器。

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

屬性值

產生摘要的工具名稱。

範例

下列程式碼會示範如何設定 GeneratorSyndicationFeed

SyndicationFeed feed = new SyndicationFeed("Feed Title", "Feed Description", new Uri("http://Feed/Alternate/Link"), "FeedID", DateTime.Now);
feed.Generator = "Generator Name or Description";
Dim feed As New SyndicationFeed("Feed Title", "Feed Description", New Uri("http:'Feed/Alternate/Link"), "FeedID", DateTime.Now)
feed.Generator = "Generator Name or Description"
<title type="text">Feed Title</title>

下列 XML 會說明 Generator 屬性如何序列化成 Atom 1.0 與 RSS 2.0。

<generator>Sample Code</generator>

備註

序列化為 Atom 1.0 和 RSS 2.0 時,會將 Generator 寫入 <generator> 元素。

適用於