简体   繁体   中英

How do i check the value of Array[x,y] quickly when debugging?

When a breakpoint is hit, I could easily hover over a variable to see its current value. But when an array is present this becomes tricky (at least for me)

dsInfo.Tables[0].Rows[0]["IsApproved"]

There are few things that I could actually do in this scenario to quickly check the value.

  1. Debug.WriteLine()
  2. MessageBox (lame!)
  3. Breakpoint -> When Hit -> Print a Message
  4. Swim through the array to the find the position.

Are there any better methods to check the value of Array[x,y] quickly using Visual Studio?

You can copy expression you want to check (dsInfo.Tables[0].Rows[0]["IsApproved"]) and paste into 'Watch' window when debugging.

Hope this helps

您可以在调试时在立即窗口(Ctrl + I)中输入变量名称/表达式dsInfo.Tables[0].Rows[0]["IsApproved"]

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM