SyndicationLink.Length 屬性

定義

取得或設定已連結資源的長度 (以位元組為單位)。

public:
 property long Length { long get(); void set(long value); };
public long Length { get; set; }
member this.Length : int64 with get, set
Public Property Length As Long

屬性值

已連結之資源的長度。

範例

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

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

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

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

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

備註

序列化為 Atom 1.0 時,會將 Length 屬性 (Property) 寫入做為 length 項目中的 <link> 屬性 (Attribute)。

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

適用於