exit program in c# code example
Example 1: exit programm c#
Application.Exit();
Example 2: c# exit application
// In a console application:
Environment.Exit(0);
// In a WPF application:
Close();
Example 3: how to exit a program in c#
Application.Exit();
Example 4: c# how to exit program
System.Environment.Exit(1);