exit() c# code example
Example 1: c# how to exit program
System.Environment.Exit(1);
Example 2: close windows web forms application c#
Application.Exit(); //It needs to be upercase...
System.Environment.Exit(1);
Application.Exit(); //It needs to be upercase...