How to view a DataTable while debugging

前端 未结 4 615
南笙
南笙 2020-12-02 08:03

I\'m just getting started using ADO.NET and DataSets and DataTables. One problem I\'m having is it seems pretty hard to tell what values are in the data table when trying to

4条回答
  •  被撕碎了的回忆
    2020-12-02 08:31

    I added two lines into my app inside a class named after the outermost class:

    public MyClass()
        {
          // The following (2) lines are used for testing only.  Remove comments to debug.
          System.Diagnostics.Debugger.Launch();
          System.Diagnostics.Debugger.Break();
        }
    

    This should stop the app and bring it up in debug mode. Then you can step through it and look at the values in your objects as you hover over them.

提交回复
热议问题