command to close console application in c# code example
Example: c# how to terminate console application
System.Envrionment.Exit(0);
//or
Envrionment.Exit(0);
System.Envrionment.Exit(0);
//or
Envrionment.Exit(0);