How can I detect network connectivity in Windows Phone 7?
How can I detect network connectivity in开发者_StackOverflow社区 Windows Phone 7? Is there a simple API for that?
I found it :-P
System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable(
);
Thanks guys you pointed me in the right direction.
Try NetworkChange.NetworkAddressChange event in System.Net.NetworkInformation namesapce.
Checkout this blog for implementation details.
It's available in the System.Net.NetworkInformation.NetworkInterface class as provided the below link http://msdn.microsoft.com/en-us/library/system.net.networkinformation.networkinterface.aspx
Consider using NetworkInformation.DeviceNetworkInformation.IsNetworkAvailable
in Microsoft.Phone.Net namespace
精彩评论