title: Exception in catch block means the finally block never executes?
body: <p>I have a simple try-catch-finally block in C#. As I understand it, the "finally" block is useful because its code will execute even if an exception is thrown inside the catch block (barring some special exception types).</p>
  
  <p>However, in the simple example below, the finally block never executes. Visual Studio says an unhandled exception is occurring in my catch block and then the program terminates. I thought execution would just jump to the finally block instead.</p>
  
  <p>How can I ensure the code in the finally block executes even when an exception occurs in the catch block?</p>
  
  <pre><code>public static void Main(string[] args)
  {
      try
      {
          throw new Exception("Apple");
      }
  
      catch (Exception ex)
      {
          throw new Exception("Banana");
      }
  
      finally
      {
          // This line never executes. Why?
          Console.WriteLine("Carrot");
      }
  }
  </code></pre>