Thursday, 1 September 2011

When is a DateTime? not a DateTime

Interesting fact I just discovered about Nullable<DateTime> (i.e. DateTime? objects) today, is that when you type check it against a non nullable version i.e. System.DateTime, then it will be classed as a DateTime type if the nullable DateTime? has a value.

E.g.

image

image

No comments:

Post a Comment

How to replace the watch battery in Logitech K750 solar power keyboard

Buy this battery http://www.watchbattery.co.uk/shop/products/BB-ML2032.shtml Open the battery cover on the back of the keyboard, you’ll need...