c# 2021 close application code example
Example 1: c# how to close application
Environment.Exit(0);
Example 2: how to close an application in c#
this.Close();
//This only close the current form or window that you are using.
Environment.Exit(0);
this.Close();
//This only close the current form or window that you are using.