c# winform exit program and kill process code example Example: c# program exit System.Windows.Forms.Application.ExitThread( )