Reputation: 1199
Is there a quick and dirty way to dump the contents of a System.Data.DataTable to a text file or some other 'thing' for debugging purposes?
Upvotes: 6
Views: 5758
Reputation: 1499770
DataTable.WriteXml(string)
will write it to a file...
myDataTable.WriteXml(filename);
It may not be as compact as you could desire, but it'll have the information you need...
Upvotes: 14