Why is null not allowed for DateTime in C#?

DateTime is a value-type (struct), where-as string is a reference-type (class etc). That is the key difference. A reference can always be null; a value can’t (unless it uses Nullable<T> – i.e. DateTime?), although it can be zero’d (DateTime.MinValue), which is often interpreted as the same thing as null (esp. in 1.1).

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)