473,406 Members | 2,849 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

quitting a C# app

Can someone please tell me the function for unconditionally terminating
an application for non-recoverable errors? In C++ I'd use exit(0).

Thanks.
Nov 16 '05 #1
4 1445
Application.Exit();
"Dave Cullen" <no*****@mail.com> wrote in message
news:40***************@mail.com...
Can someone please tell me the function for unconditionally terminating
an application for non-recoverable errors? In C++ I'd use exit(0).

Thanks.

Nov 16 '05 #2
Some other notable methods
- System.Environment.Exit()
- System.Diagnostics.Process.GetCurrentProcess().Kil l()

--
Jared Parsons [MSFT]
ja******@online.microsoft.com
This posting is provided "AS IS" with no warranties, and confers no rights.
OR if you wish to include a script sample in your post please add "Use of
included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm"

"ilPostino" <ne**@ip80.com> wrote in message
news:OI**************@TK2MSFTNGP09.phx.gbl...
Application.Exit();
"Dave Cullen" <no*****@mail.com> wrote in message
news:40***************@mail.com...
Can someone please tell me the function for unconditionally terminating
an application for non-recoverable errors? In C++ I'd use exit(0).

Thanks.


Nov 16 '05 #3
Environment.Exit(exitcode) in a non-GUI app.

--
cody

Freeware Tools, Games and Humour
http://www.deutronium.de.vu || http://www.deutronium.tk
Nov 16 '05 #4
Environment.Exit(exitcode) in a non-GUI app.

--
cody

Freeware Tools, Games and Humour
http://www.deutronium.de.vu || http://www.deutronium.tk
Nov 16 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: The Roys | last post by:
Hi Im doing something wrong in quitting the Word.Application in my VB program. I have General Declarations Dim AppWord As Word.Application Form_Load() Set AppWord =...
1
by: BadOmen | last post by:
I am using the GetActiveWindow() API but it returns 0 I have a remote that I activate this code with: Code: WinAmpHandler = GetActiveWindow WinAMPhWnd = FindWindow("Winamp v1.x",...
1
by: Gitte Wange | last post by:
Hello, I'm trying to create an application that needs a Timer() to do various checks. My class has a self.timer = Timer(900, self.sendDNSRequest) The timer itself works fine but whenever I try...
0
by: Deaconess | last post by:
I am quitting this group - ever since I joined I have been at least 15 Microsoft viruses a day if not more. Good luck to you all. Back to Yahoo
7
by: Mike | last post by:
Please help. I am using object.quit in an attempt to quit an excel application that I started with createobject ("Excel.Application"). The code executes, but does not stop the application. When...
0
by: jwright | last post by:
I'm using Sapient's Buildit script (cited in an MS Patterns & Practices doc on team development) and I have run into instaces where the solution.DTE.QUIT(); does not appear to work. This occurs when...
8
by: bearophileHUGS | last post by:
Hello, I have four things to ask or to suggest, sorry if they seem basic or already discussed. ------------------- I am still ignorant about Tkinter. This little program, after pressing the...
2
by: Tony Ciconte | last post by:
We have developed an Acc97 application and distribute it using the Wise installation system and SageKey scripts. The installations are rock solid and the product works well on all types of systems....
4
by: Chris | last post by:
Hi, I'm puzzled by some strange behavior when my Python/Tkinter application quits (on linux): the terminal from which I started Python is messed up. If start up python, then import the code...
1
by: subratamaji | last post by:
Hi, I am trying to open the form from the project explorer( Visual basic 6.0 ) by double clicking on a particular form ( frmDispatchEntry ) I am getting the :- RUN-TIME ERROR 50001...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.