c# how to close console app code example
Example 1: c# how to terminate console application
System.Envrionment.Exit(0);
//or
Envrionment.Exit(0);
Example 2: how to close an application in c#
this.Close();
//This only close the current form or window that you are using.