【发布时间】:2021-11-05 10:43:36
【问题描述】:
我正在使用 Visual Studio 2019 社区,并且我有以下代码:
if(this != myOtherObject
&& anotherVariable != true)
{
//do something
}
这里的想法是我在 if 中有各种条件。所以我想知道是否有某种调试方法可以知道它是第一个条件为真还是第二个条件等等。
如果没有,我认为可能的唯一方法是:
if(this != myOtherObject)
{
if(anotherVariable != true)
{
//do something
}
}
谢谢。
【问题讨论】:
-
按 shift + F9,然后编写所需的代码,然后按 Enter,这有帮助吗?
-
这行得通,非常感谢。
标签: c# visual-studio debugging