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()
三种常用的字符串判空串方法:
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 == "");

浙公网安备 33010602011771号