C# Application won't close -


i'm writing program uses char value determine string write. have (with both cplant , ssql declared earlier)

if (cplant == 'b') {     ssql = "somestring1"; } else if (cplant == 'd') {     ssql = "somestring2"; } else {     messagebox.show("error!");     application.exit();     messagebox.show("shouldn't see this!"); } 

shouldn't application.exit(); kill program?

application.exit(); 

all post message message pump requesting application closes (much user clicking close icon).

all normal exit code (eg. form's implementing onclosing) run after caller returns message pump can process outstanding messages.

of course in code runs cancel closure…


Comments

Popular posts from this blog

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -

javascript - oscilloscope of speaker input stops rendering after a few seconds -