To exit an application in C# and VB.NET you can use the following snippet.
Sample C#
System.Windows.Forms.Application.Exit(0); // WINFORM Environment.Exit(0); // CONSOLE APP Application.Shutdown(); // WPF
Sample VB.NET
System.Windows.Forms.Application.[Exit](0) ' WINFORM Environment.[Exit](0) ' CONSOLE APP Application.Shutdown() ' WPF
RT @CodeSnippetsNET: Exit an application in .NET http://t.co/QHuaQrgkQA #csharp #vb #dotnet #programming #code #coding #dev
RT @CodeSnippetsNET: Exit an application in .NET http://t.co/QHuaQrgkQA #csharp #vb #dotnet #programming #code #coding #dev