1   if (ds.Tables[0].Rows[0]["NullField"] == DBNull.Value)   

2  if (ds.Tables[0].Rows[i]["NullField"] is DBNull)

3.isdbnull(ds.tb.row(xx).item(xx))  return Bool

4.Convert.IsDBNull()

三种常用的字符串判空串方法:
  • Length法:bool isEmpty = (str.Length == 0);
  • Empty法:bool isEmpty = (str == String.Empty);
  • General法:bool isEmpty = (str == "");

相关文章:

  • 2021-12-16
  • 2021-06-16
  • 2021-05-27
  • 2021-05-10
  • 2021-12-30
  • 2022-01-04
  • 2021-07-31
  • 2022-01-29
猜你喜欢
  • 2022-12-23
  • 2021-11-20
  • 2022-02-25
  • 2022-01-22
  • 2021-05-18
  • 2021-09-02
相关资源
相似解决方案