Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Application.Exit()
Message
General information
Forum:
ASP.NET
Category:
Other
Title:
Application.Exit()
Miscellaneous
Thread ID:
01092696
Message ID:
01092696
Views:
58
I ran accross something that I found a little odd. In my Main() I have something like this:
// do some stuff

if (something != somethingElse)
{
  MessageBox.Show("something is different from somethingElse so I will have to exit!");
  Application.Exit();
}

// do some more stuff

Application.Run(new Form1());
Now if something was different from somethingElse I would expect Form1 never to be displayed, but it is. What am I missing?
I know I can get around it by throwing an exception (yes Bonnie I know it is expensive <s>) or setting up some bool flags here and there and simply never doing the Application.Run but I don't understand why Exit doesn't exit. Maybe I am just to tierd now and this will all make sense in the morning :)
Semper ubi sub ubi.
Next
Reply
Map
View

Click here to load this message in the networking platform