how to exit a program in c#

C#
Application.Exit();
Source

Also in C#: