how to terminate a c#.net program code example Example: c# program exit System.Windows.Forms.Application.ExitThread( )