SyntaxFix
Write A Post
Hire A Developer
Questions
You need to hook to console exit event and not your process.
http://geekswithblogs.net/mrnat/archive/2004/09/23/11594.aspx
Capture console exit C#