c# program exit

C#
System.Windows.Forms.Application.ExitThread( )
Source

Also in C#: