Looking for a better way to compare a nullable date time than the following:
Any suggestions?
// myobject.ExpireDatetime is of DateTime? // if (!myob
If ExpireDateTime is a Nullablei would do following instead:
ExpireDateTime
Nullable
if (ExpireDateTime.HasValue && ExpireDateTime < DateTime.Now.ToUniversalTime()) { }