I have two date properties and they are exactly the same as i am mapping from one object to another. If I compare them as below it returns false:
if(obj1.d1 == obj2.d1)
{
}
both of them are {01/06/2011 15:44:32}.
I cannot use DateTime.Compare as they are nullable. what would be the best way to compare nullable dates?
Check the actual ticks of those dates, they might be different. Note that
DateTimerecords 100 ns intervals as its smallest unit. Those aren’t shown when you format theDateTime.