How to check whether Wi-Fi Connection is enabled on Windows phone device

In this short tip I shall be explaining you the simplest way to check the WiFi connection status in Windows Phone. This is a very necessary and required feature for all the apps that use an internet connection. For example if you you want to request something from the internet or send something to a server that may require an active WiFi connection then you need to be ensure WiFi is available to avoid errors. The code for the following is given below.