static void Main() { //do stuff Environment.Exit(1);// exit }
System.Environment.Exit(0); // or Environment.Exit(0);