I know about Application.Exit() but what if I'm not in a windows forms application but in a simple class library, how do I signal for the application to exit?
Environment.Exit() -- but why would you ever want to do this from a method in a class library?
P/Invoke ExitProcess, perhaps. Or if you're really in a hurry, TerminateProcess.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With