I'd like to add a DataTable to more than one DataSet without calling DataTable.Copy(). Simply copying the DataTable doubles the amount of data in memory and causes me to manage its changes. This problem exists because I am implementing a detail tables solution where a detail table can have more than one master.
If it helps, consider this snippet and resulting frowny face.
DataTable table1 = GetDataTable(); // 100 rows of data
DataTable table2 = table1;
DataSet1 dataset1 = new DataSet();
DataSet2 dataset2 = new DataSet();
dataset1.Tables.Add(table1);
dataset2.Tables.Add(table2); // fails because table2 already exists in dataset1 :-(
Any pro suggestions out there? Thanks!