.NET Compact alternative for Environment.Exit()

J

Jo Vermeulen

Hello,

I am looking for a Compact .NET alternative to the Environment.Exit()
function, which only exists in the full .NET framework. I'm thus looking
for a way to exit my application (with an optional errorcode perhaps).

Thanks in advance,
 
A

Alex Yakhnin

How about Application.Exit()... It will not close all the self started
threads though....
 
L

Leha2000

You can define main entry point as
public static int Main() {}
and use return <some exit code>.

Or you can use P\Invoke and TerminateProcess().

Alex
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top