.NET Compact alternative for Environment.Exit()

  • Thread starter Thread starter Jo Vermeulen
  • Start date Start date
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,
 
How about Application.Exit()... It will not close all the self started
threads though....
 
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

Back
Top