title: Event when the console is Closing vb.net
body: <p>I would like my console launch a function when it closing, like that :</p>
  
  <pre><code>Sub Console_Closing(sender As Object, e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
  </code></pre>
  
  <p>But, I'm not using Windows Form but the module, and I can't import Windows Form in the project.
  Haven't you got an idea ?
  Tanks ;)</p>