public class AbsoluteTime : ICacheItemExpiration
{
private DateTime _absoluteExpirationTime;
private string _keyValue;
public event ItemDependencyChangeEventHandler Change;
public AbsoluteTime()
{
this._absoluteExpirationTime = Midnight;
}
public static DateTime Midnight
{
get
{
return DateTime.Today.AddDays(1.0);
}
}
}
小结:
1,属性也有静态的
2,在构造函数中可以调用静态属性
3,可以把静态属性的值提供给字段