My C# class has a date/time property that I will use Code First to map to a column in an SQL Server database. This date will never be prior or close to default( DateTime ). If I type the property as System.DateTime
then I could always check for an unset value with MyProp == default( DateTime )
.
Is there a compelling reason whether or not to type this property as a (nullable) DateTime?
instead of a (non-nullable) DateTime
? Why?