Nick Randell Nick Randell - 3 years ago 171
C# Question

How do I trap ctrl-c in a C# console app

I would like to be able to trap ctrl-c in a C# console application so that I can carry out some cleanups before exiting. What is the best way of doing this?

aku aku
Answer Source
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download