How can we check whether a dataset is empty or not in C#.net

How can we check whether a dataset is empty or not in C#.net

To check whether a dataset is empty or not in C#.net:- 

bool IsEmpty(DataSet dataSet) 
{ 
    foreach(DataTable table in dataSet.Tables) 
        if (table.Rows.Count != 0) return false; 
 
    return true; 
} 

By:kamal
Date:2015-10-10 00:00:00

Post Your Answers


User Email:

User Name:
Answers:

Related C Links

C interview questions and answers for experienced and fresher