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> 属性形式写出。

适用于