Check out example codes for "how to close a windows form application in c#". It will help you in understanding the concepts better.

Code Example 1

Application.Exit();

Code Example 2

application.Exit();

Learn ReactJs, React Native from akashmittal.com