可能重複:
In C# will the Finally block be executed in a try, catch, finally if an unhandled exception is thrown ?異常
,最終會在這種情況下執行的(在C#)?
try
{
// Do something.
}
catch
{
// Rethrow the exception.
throw;
}
finally
{
// Will this part be executed?
}
看到這個副本(或其中一個其他重複鏈接在那裏):http://stackoverflow.com/questions/833946/in-c-will-the-finally-block-be-executed-in-a-try -catch-finally-if-an-unhandled – 2009-05-23 08:55:25