private string TestMethod() { try { throw new Exception("Go Pack Go"); return "in try"; } catch (Exception Ex) { MessageBox.Show(Ex.ToString()); return "in catch"; } }I can see that, in this case, the 'return' will never execute (incidently VB.NET doesn't flag this up). But I was under the impression that a 'return' would never work in a try block (help states "You cannot branch out of a TRY block, into a CATCH block, or into or out of a FINALLY block"). However it looks like I was wrong:
Private Sub Test() Try Throw New Exception("Outer") Catch ex as Exception Try Return Finally MsgBox("Inner Finally") End Try MsgBox("Back to Outer") Finally MsgBox("Outer Finally") EndTry MsgBox("Normal Return") End SubThis VB code runs both Finally blocks then executes the Return (ie "Back to Outer" and "Normal Return" don't execute). Oh well, live and learn....