UtcLastModified Property
Collapse the table of content
Expand the table of content

CacheDependency.UtcLastModified Property


Gets the time when the dependency was last changed.

Namespace:   System.Web.Caching
Assembly:  System.Web (in System.Web.dll)

public DateTime UtcLastModified { get; }

Property Value

Type: System.DateTime

The time when the dependency was last changed.

This property is measured in Coordinated Universal Time (UTC) (also known as Greenwich Mean Time).

The following code example uses the AggregateCacheDependency class to add an item, with two CacheDependency object dependencies, to the Cache. When a request for the Cache item is made, the code checks whether the item is in the Cache. If it is, the UtcLastModified property is converted to a string and displayed on the page. If it is not, the item and its two dependencies are created and added to the Cache.

.NET Framework
Available since 2.0
Return to top
© 2015 Microsoft