.NET将停止调试在finally块中运行代码? [英] .NET Will stop debugging run the code in the finally block?

查看:140
本文介绍了.NET将停止调试在finally块中运行代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗯,我已经阅读了(并且学习到)finally块并不总是执行其代码(除了拔插头)。
FYI有关更多信息,请参阅尝试抓住最后的问题

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

然而,我还没有找到:

当我停止调试器时,我的finally块是否被执行?

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

谢谢!

推荐答案

不。在到达finally块之前停止调试器时,不会执行调试器。

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

这篇关于.NET将停止调试在finally块中运行代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆