Check out example codes for "c# program exit". It will help you in understanding the concepts better.

Code Example 1

System.Windows.Forms.Application.ExitThread( )

Learn ReactJs, React Native from akashmittal.com