Is there any way to call a function in C# when the user exists the application?
I'm using Visual C# 2008 Express edition.
Thanks.
Is there any way to call a function in C# when the user exists the application?
I'm using Visual C# 2008 Express edition.
Thanks.
It's a windows forms applications, isn't it? You can use this event:
System.Windows.Forms.Application.ApplicationExit += ...
I've never tried it so this may be a shot in the dark, but couldn't one override the default exit method and do something like protected override exit {myMethod(); base(e);} Though I'm assuming delegation does essentially the same thing in this case