English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I know in Visual Basic.Net, I would use me.close() the close the whole program. How do I do this in C#? Now, I have a messagebox and when the user clicks cancel it just goes back to the form. I want it so that when they hit cancel it will just close the whole program.

2007-02-18 13:27:07 · 2 answers · asked by Anonymous in Computers & Internet Programming & Design

2 answers

I think you could use Environment.Exit(0) to kill the program.

2007-02-18 13:41:05 · answer #1 · answered by nerd00 2 · 0 0

I am recalling on top of my head on this one since my iPaq is not in my hand: System.Exit() to punch out the whole program, MessageBox.Show() returns the button enum or ID being pressed.

2007-02-18 21:34:07 · answer #2 · answered by Andy T 7 · 1 0

fedest.com, questions and answers