What is the equivalent of End (VB6/VBA) in order to end in C# for Windows applications?

c#, vb6

Solution

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);

Problem

What is the equivalent of `End` (VB6/VBA) in order to end an application using C#?

Original source