How do I end a script prematurely? roger_74 wrote on 1/29/2003, 7:41 AM This is probably easy, but i haven't been able to do it.. Application.Exit() didn't work. Back to post
Comments SonyPJM wrote on 1/29/2003, 9:18 AM You should use language features like if, while, for, try, throw, catch, etc. roger_74 wrote on 1/29/2003, 9:29 AM Ok. I was hoping to not have to put everything inside big if-statements, but that'll work too. SonyPJM wrote on 1/29/2003, 4:16 PM I find it works well to use try, throw, and catch... try { // a bunch of code here if (<error check>) { throw "an error occured"; } // more code here } catch (errorMessage) { MessageBox.Show(errorMessage); } 1