Looking for a better way to compare a nullable date time than the following:
Any suggestions?
// myobject.ExpireDatetime is of DateTime? // if (!myob
Use the Value property of the nullable:
objet.ExpireDateTime.Value
if (!object.ExpireDateTime.IsNull() && DateTime.Compare(objet.ExpireDateTime.Value, DateTime.Now.ToUniversalTime()) < 0) { }