.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
 
Back
Top