c# code dosent end after i exit form window code example Example: c# program exit System.Windows.Forms.Application.ExitThread( )