Hi
What is the equivalence of End (vb6) when we wanna to end an application using c#?
Hi
What is the equivalence of End (vb6) when we wanna to end an application using c#?
To terminate Windows Forms application use:
Application.Exit();
To terminate a console application you must return the main function.
The marked answer is not correct. Application.Exit() is a graceful shutdown, it can be blocked by a form's FormClosing event handler setting e.Cancel = true. The exact equivalent to the VB End statement is Environment.Exit(0);