hey,
I always struggle with the following:
I have an object obj with a property paydate (type = DateTime)
Now, after instantiating the object and do several things, I want too check if my paydate is still empty.
How can I do this?
I tried several things like (all with errors):
if (obj.paydate == null)
if (obj.paydate.gettype() == System.DBnull)
if (obj.paydate == 01/01/0001)
etc.....
Another question :
When I want to instantiate the object and fill it with data from an sql-query (sql-database). The value received from sql for paydate = null.
How can I test in the datareader that the received data from sql is null and so I put nothing in obj.paydate.
tkx,
Nic