Page 2 of 2

Issue with Nullable<DateTime>

Posted: Thu May 12, 2011 7:39 am
by Alex K.
Hello,

As a way, in this case you can use the following code:

Code: Select all

if ( MyData["Birthday"] == DBNull.Value )
instead

Code: Select all

if( !MyData.Birthday.HasValue )
Thank you.