title: Performing some actions before closing winform application in c#
body: <p>I want to perform some actions after the user clicks x button but before the program exits.</p>
  
  <p>Is it possible ? If yes then how can i do it ?</p>