SyndicationItem.LastUpdatedTime 属性

定义

获取或设置联合项的上次更新时间。Gets or sets the last updated time for the syndication item.

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

属性值

DateTimeOffset

一个表示联合项上次更新时间的 DateTimeOffset 实例。A DateTimeOffset instance that represents the time the syndication item was last updated.

示例

下面的代码演示如何在 LastUpdatedTime 实例上设置 SyndicationItem 属性。The following code shows how to set the LastUpdatedTime property on a SyndicationItem instance.

SyndicationItem item = new SyndicationItem("Item Title", "Item Content", new Uri("http://Item/Alternate/Link"));
item.LastUpdatedTime = DateTimeOffset.Now;
Dim item As New SyndicationItem("Item Title", "Item Content", New Uri("http:' Item/Alternate/Link"))
item.LastUpdatedTime = DateTimeOffset.Now

下面的 XML 演示如何将此属性序列化为 Atom 1.0。The following XML shows how this property is serialized to Atom 1.0.

<updated>2007-03-19T20:34:23Z</updated>  

下面的 XML 演示如何将此属性序列化为 RSS 2.0。The following XML shows how this property is serialized to RSS 2.0.

<a10:updated>2007-03-19T20:34:23Z</a10:updated>  

注解

序列化为 Atom 1.0 时,会将此属性写入 <updated> 项。When serialized to Atom 1.0, this property is written to an <updated> item. 序列化为 RSS 2.0 时,会将此属性写入 <a10:updated> 项。When serialized to RSS 2.0, this property is written to an <a10:updated> item.

适用于