How to check whether data connection is enabled on Windows phone device

While using some internet services in your application you may need to check whether data connection is enabled or disabled on user’s phone.

So here is a simple code with the help of which you can check it. The code for the following is given below.