Where is C# the exit event code example
Example: c# exit application
// In a console application:
Environment.Exit(0);
// In a WPF application:
Close();
// In a console application:
Environment.Exit(0);
// In a WPF application:
Close();