C# - What does the Assert() method do? Is it still useful?

后端 未结 9 1707
青春惊慌失措
青春惊慌失措 2020-12-12 10:37

I am debugging with breakpoints and I realize the assert call? I thought it was only for unit tests. What does it do more than breakpoint? Since I can breakpoint, why should

9条回答
  •  一向
    一向 (楼主)
    2020-12-12 10:59

    Assert also gives you another opportunity to chuckle at Microsoft's UI design skills. I mean: a dialog with three buttons Abort, Retry, Ignore, and an explanation of how to interpret them in the title bar!

提交回复
热议问题