How to Validate DataSet with Data in C#

This blog how how Validate DataSet if have data, in the language of C#, I have create a method that return true or false.

public bool HashDataset(DataSet ds)
        {
            if (!ds.Tables.Contains("NameDataset"))
                return false;
            int index = ds.Tables["NameDataset"].Rows.Count;
            if (index < 1)
                return false;
            return true;
        }

X

Build smarter apps with Machine Learning, Bots, Cognitive Services - Start free.

Start Learning Now