Causing VS2010 debugger to break when Debug.Assert fails

后端 未结 7 2107
南笙
南笙 2020-12-15 09:15

Is there any way to cause Visual Studio 2010 to break while debugging when the argument of Debug.Assert evaluates to false?

Example: in my

7条回答
  •  独厮守ぢ
    2020-12-15 09:33

    Can't you just throw an exception when !double.IsInfinity(x) instead of using an assertion?

提交回复
热议问题