我怎样才能轻松地查看即时窗口的数据表或数据视图的内容视图、数据表、窗口、轻松

2023-09-02 11:56:03 作者:山溪水梦

有时候,我会在我的code断点,我想查看一个数据表变量(或数据集的数据表)中的内容。快速手表不给你的内容很明确的说法。我如何可以查看他们很容易?

Sometimes I will be at a breakpoint in my code and I want to view the contents of a datatable variable (or a datatable in a dataset). The quick watch doesn't give you a very clear view of the contents. How can I view them easily?

推荐答案

Visual Studio调试带有四个标准的可视化工具。这些都是文本,HTML和XML可视化工具,所有这些工作的字符串对象,和数据集可视化工具,它适用于数据集,数据视图,并DataTable对象。

The Visual Studio debugger comes with four standard visualizers. These are the text, HTML, and XML visualizers, all of which work on string objects, and the dataset visualizer, which works for DataSet, DataView, and DataTable objects.

要使用它,闯入你的code,鼠标移到你的数据集,展开快速手表,查看表,展开,然后查看表[0](例如)。你会看到类似{}表1在快速手表,但是请注意,也有放大镜图标。点击该图标,您的数据表将在网格视图中打开了。

To use it, break into your code, mouse over your DataSet, expand the quick watch, view the Tables, expand that, then view Table[0] (for example). You will see something like {Table1} in the quick watch, but notice that there is also a magnifying glass icon. Click on that icon and your DataTable will open up in a grid view.