Share via


SyndicationLink.Uri 屬性

定義

取得或設定已連結資源的 URI。

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

屬性值

Uri

Uri 執行個體,其中包含已連結之資源的 URI。

範例

下列程式碼會示範如何設定新聞訂閱連結的 URI。

下列 XML 會示範 Uri 屬性如何序列化為 Atom 1.0。

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

下列 XML 會說明 Uri 屬性如何序列化為 RSS 2.0。

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

備註

序列化為 Atom 1.0 時,此值會寫出做為 href 項目中的 <link> 屬性。

序列化為 RSS 2.0 時,此值會寫出做為 href 項目中的 <a10:link> 屬性。

適用於