How to close a Windows phone app programmatically using c#

In Windows phone the apps are typically terminated by the user pressing the back button. But at times there may be a situation at times that one may want to terminate the application programmatically. So as to close the application programmatically using c# we have the API given below.


For Windows phone 8.1(Universal apps)



For Windows phone 8



Note: Make sure to save important data before calling this API. No events will be fired following termination.

Chetan Gulati

Currently am doing B TECH in IT from Delhi Technological University. App development is my passion. Believe in quality rather than quantity.

Read more:
How to create your first Windows Phone app
How to change the App name and Tile name of your Windows phone app
Data binding in Windows Phone app – One way binding