Determine DataRow is Null ? URGENT

O

Oney

DataRow[] dr = dt.Select("Id=" + dtMessages.Rows["Id"].ToString());

How can I determine the dr[0] is null or not ?

if(dr[0].IsNull(0) == false) statement doesn't work!
 
F

Fredrik Elestedt

if (dr == null || dr[0] == null) {

}

dr == null is just in case, probably isn't needed...
 

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

Members online

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,233
Latest member
AlyssaCrai

Latest Threads

Top