Reputation: 11423
I want to ask if there 's some debug tools to show the result in a flat table to facilitate finding any logical errors .
For Example ::
Now I want to see all these rows in a flat table instead of each one through the debugger .
Is there any tool like LINQPad
for example for this purpose ?
Upvotes: 3
Views: 242
Reputation: 460238
The debugger of Visual Studio has already a builtin DataTable
visualizer. Just click on the loupe-symbol and you can inspect it as table.
If you don't analyze a DataTable
but a DataRowCollection
(as in your screen shot), you can use this in the quick-watch-window of the debugger:
rows.Cast<DataRow>().CopyToDataTable()
After you have executed it there, you're able to click on the loupe to inspect the table. That works also with a Linq
query or a Rows
property of a DataTable
.
Upvotes: 2
Reputation: 9670
I am not aware of an existing tool to show a DataRowCollection in a table form - but generally, these types of tools are called Visualizers. Here is the MSDN page on them - including a link on how to build your own. It's really very straightforward.
Upvotes: 1
Reputation: 62157
No, there is not (none that I know of) but you can actually write your own debugging extension. It is not that hard.
THe main problem here is more the use of a DataTable, which is slow, a memory hog and in general worse than real ojects.
Upvotes: -1