how to properly close a window in c # code example Example 1: c# close window Application.Exit(); Example 2: c# window instantly close System.Console.ReadLine();