DataSet ds = new DataSet(); // Retrieve the table from wherever DataTable table = new DataTable("TableName"); ds.Tables.Add(table);If it's already part of a DataSet (ex. you can tell by checking to see if the tables DataSet property is null or not), you'll get an error if you try assigning it to another DataSet. If that's the case, you can copy the DataTable, then add the copy:
if (table.DataSet != null) { DataTable newTable = table.Copy() ds.Tables.Add(newTable); }