If statement appears to be evaluating even when condition evaluates to false

前端 未结 5 2020
梦如初夏
梦如初夏 2020-12-28 19:47

Late At Work last night, we were trying to figure out why something was failing. A validation check was failing when it shouldn\'t have been.

We ended up adding a pr

5条回答
  •  醉话见心
    2020-12-28 20:25

    Check out this thread.

    If statement weirdness in Visual Studio 2008

    It comes down to this, you can't trust the debugger all the time.

    To "fix" that if statement, add an empty else {} statement to it. The debugger will work as expected.

提交回复
热议问题