请考虑以下代码,其中LockDevice()可能会失败并在ist上抛出异常.如果从finally块中引发异常,C#中会发生什么?
UnlockDevice(); try { DoSomethingWithDevice(); } finally { LockDevice(); // can fail with an exception }
c# exception finally try-catch
c# ×1
exception ×1
finally ×1
try-catch ×1