title: c# console wont close after program ends
body: <p>I have c# application that I am running, and then in some point application throws an error which is then catched, then app should end. And it ends, but console windows stays open...</p>
  
  <p>I even checked in <code>windows task manager</code>, under <code>applications</code> tab, there is listed my console, but when I click <code>go to process</code>, there is no process of that application.</p>
  
  <p>Thats weird... Application ended, process ended, but console stays on? How can I kill that console?</p>
  
  <p>Edit: my code:</p>
  
  <pre><code>static class Program
      {
          static void Main()
          {
              try
              {
                  //bunch of static methods from other static classes are being invoked
  
                  Setup.Driver.Close();//another static method
              }
              catch (Exception)
              {
                  Setup.Driver.Close();
              }
          }
      }
  </code></pre>
  
  <p><strong>Second edit:</strong> Note: Process.Getprocess().Kill(), Application.Exit(), Environment.Exit() are not working for me, in windows task manager, there is no process left to kill, only console stays open! </p>