2

So int and datetime are not nullable in c#, so you cant assign null to them
While you can't compare int to null (int a; a==null won't compile) you can do it with datetime objects.
Microsoft, can you please get your shit together?

Took me like an hour to realize my date is actually the 1.1.0001 and not null.

Comments
  • 0
    Datetime dt; Dt ==null
    Is always false. You should not be able to compare null to a not nullable type in the first place.
    And yes, I know how to allow null values. Thank you.
Add Comment