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