判断DataTable是否为空

DataTable:

if(DataTable== null || DataTable.Rows.Count == 0 )

{

  //为空的操作

}

 

DataRow:


if(!DataRow.IsNull("列名"))

{

  //不为空的操作

}
原文地址:https://www.cnblogs.com/BinBinGo/p/6019108.html