Reputation: 122212
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?
Upvotes: 5
Views: 2564
Reputation: 532665
Environment.Exit() -- but why would you ever want to do this from a method in a class library?
Upvotes: 9
Reputation: 4417
P/Invoke ExitProcess, perhaps. Or if you're really in a hurry, TerminateProcess.
Upvotes: 3