Checks if a datatable has rows

Niladri.Biswas
Posted by Niladri.Biswas under C# category on | Points: 40 | Views : 916
/// <summary>
/// Checks if a datatable has rows
/// </summary>
/// <param name="dt"></param>
/// <returns></returns>
public static bool HasRows(this DataTable dt)
{
return dt.Rows.Count > 0 ? true : false;
}

Comments or Responses

Login to post response