- Back to Home »
 - Windows Phone apps »
 - Windows phone 8 C# code to check network or internet or wifi availablility
 
                          Posted by : 
                          Sudhir Chekuri
Monday, 25 November 2013
C# code in Windows phone 8 apps to display message in message box saying Network not available to update data when internet is not available in phone.
bool isNetwork = NetworkInterface.GetIsNetworkAvailable();
if (!isNetwork)
{
MessageBox.Show("Network not available to update data");
}
else {
//code to work when network is available
}
bool isNetwork = NetworkInterface.GetIsNetworkAvailable();
if (!isNetwork)
{
MessageBox.Show("Network not available to update data");
}
else {
//code to work when network is available
}
