Finding null value in Dataset - DataRow.IsNull method vs ==DbNull.Value - c#
问题 What are the benefits of using the c# method DataRow.IsNull to determine a null value over checking if the row equals DbNull.value? if(ds.Tables[0].Rows[0].IsNull("ROWNAME")) {do stuff} vs if(ds.Tables[0].Rows[0]["ROWNAME"] == DbNull.value) {do stuff} 回答1: There is no real practical benefit. Use whichever one seems more readable to you. As to the particular differences between them, the basic answer is that IsNull queries the null state for a particular record within a column. Using == DBNull