how to tell a program to colse itself in c# code example
Example 1: c# how to exit program
System.Environment.Exit(1);
Example 2: c# how to close application
Environment.Exit(0);
System.Environment.Exit(1);
Environment.Exit(0);