ASP.Net check value with DBNULL

Posted by c11ada on Stack Overflow See other posts from Stack Overflow or by c11ada
Published on 2010-03-23T16:11:31Z Indexed on 2010/03/23 16:13 UTC
Read the original article Hit count: 357

Filed under:
|

hey all,

i have the following code

foreach (DataRowView dr in Data)
        {
            if (dr == System.DBNull.Value)
            {
                nedID = 1;
            }
        }

but i get the following error Operator '==' cannot be applied to operands of type 'System.Data.DataRowView' and 'System.DBNull'

please can some one advice me on how i can check if the value is null or DBNULL

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about dbnull