Generic helper function to check for dbnull value for any type?

  • Thread starter Thread starter John Dalberg
  • Start date Start date
J

John Dalberg

..NET 2.0.

Is there a generic single function to check for a dbnull regardless of data
type?

John Dalberg
 
John said:
.NET 2.0.

Is there a generic single function to check for a dbnull regardless of data
type?

I'm not sure what you mean by this. If you mean "regardless of type
stored in the DataRow cell" then can't you just do this:

if (row["ColumnName"] == DBNull.Value) ...

? If you mean something else then please clarify....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top