.NET Will stop debugging run the code in the finally block?

丶灬走出姿态 提交于 2019-12-10 16:52:50

问题


Well, I've read (and learned) that the finally block doesn't always execute its code (even apart from pulling the plug).
FYI For more information, see try catch finally question

However, what I haven't found:
Does my finally block get executed when I stop the debugger?

Thanks!


回答1:


No. When you stop the debugger before reaching the finally-block, it won't be executed.



来源:https://stackoverflow.com/questions/11084050/net-will-stop-debugging-run-the-code-in-the-finally-block

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!