
Originally Posted by
jmcilhinney
Nothing weird about it. Nothing as an Integer is simply zero.
An integer can't be nothing and has a default value of zero... that's not the same.
Code:
Dim I as integer
I = Nothing
If I = Nothing then
Will give syntax errors on the second and third line... but
Code:
Dim D as Date
D = Nothing
If D = nothing then
Won't give an error... the Minvalue equals Nothing that is very inconsistent with the object oriented concept of Nothing means there's no object at all.
I'm using a Devcomponents Dotnetbar control in this case, it can bind to an nullable of date but it encounters the same problem as I do in the code behind.
And I don't wan't a 'zero' value of 01-01-0001 to be shown in a inputfield for
the date someone has passed away if he or she is still alive.
But I've learned to live with writing ugly code for date input by now.