Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Application.Exit()
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Application.Exit()
Divers
Thread ID:
01092696
Message ID:
01092696
Vues:
57
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.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform