Friday, May 11, 2012

Appending Values to Datatable in Loop

   DataTable results = new DataTable();

   foreach (string somevalue in somecondition)
   {

        DataTable toMerge = new DataTable();
        
        toMerge = // Some code to get datatable values

        results = results.Merge(toMerge);

    }