I've read a bunch of posts and off-site URLs on E-E but don't understand how to structure code in C# to capture a system shutdown event so that my forms based app has time to cleanup things before the inevitable end.
I'm seeking three things:
1. What do I put in Form1_Load() method?
2. What is exact C# signature for Closing/OnBeginShutdown/etc. event?
3. What value do I check inside shutdown event that indicates system shutdown?
I haven't found one page the answers these questions in C#... only VB which doesn't help me.