How can I compare a date in C# to "1/1/0001 12:00:00 AM")
Solution 1:
You can use DateTime.MinValue
, which has exactly the same value:
if (e.CreatedDate == DateTime.MinValue)
Solution 2:
To check if it equals the default, you can use the default keyword:
if (e.CreatedDate == default(DateTime))