Why DataTable.Rows.ImportRow doesn't work when passing new created DataRow?
I need to add newRow to MyHandler and it should add that row to the table that was built internally from the "scheme" that was passed to the MyHandler. The problem is when I use dt.ImportRow(row); it doesn't add any row. If I add newRow to t table and then do handler.Add(t.row[t.Rows.Count - 1]); so it works, but I don't want to add to t table. The t is just so I could create new row. Why dt.ImportRow(row); doesn't work? How to fix it? { var t = new DataTable(); t.Columns.Add(new DataColumn("Col1", typeof(string))); t.Columns.Add(new DataColumn("Col2", typeof(byte))); t.Columns.Add(new