[英]wp7 NetworkInterface.GetIsNetworkAvailable() two namespace?
System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable();
Microsoft.Phone.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable();
Is there a difference between? 两者之间有区别吗? How to using NetworkInterface.GetIsNetworkAvailable() ?
如何使用NetworkInterface.GetIsNetworkAvailable()?
Microsoft.Phone.Net.NetworkInformation.NetworkInterface
inherits from System.Net.NetworkInformation.NetworkInterface
and adds the GetNetworkInterface
static method and the NetworkInterfaceType
static property. Microsoft.Phone.Net.NetworkInformation.NetworkInterface
继承自System.Net.NetworkInformation.NetworkInterface
并添加了GetNetworkInterface
静态方法和NetworkInterfaceType
静态属性。 Otherwise, the two classes are identical. 否则,这两个类是相同的。
You can find a sample using the NetworkInterface.GetIsNetworkAvailable
method on MSDN: http://msdn.microsoft.com/fr-fr/library/system.net.networkinformation.networkinterface.getisnetworkavailable(v=vs.95).aspx 您可以在MSDN上使用
NetworkInterface.GetIsNetworkAvailable
方法查找示例: http : //msdn.microsoft.com/fr-fr/library/system.net.networkinformation.networkinterface.getisnetworkavailable( NetworkInterface.GetIsNetworkAvailable
.aspx
if (NetworkInterface.GetIsNetworkAvailable())
{
// Online
}
else
{
// Offline
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.