2016-03-15 34 views

回答

0
public static bool IsInternet() 
{ 
    ConnectionProfile connections = NetworkInformation.GetInternetConnectionProfile(); 
    bool internet = connections != null && connections.GetNetworkConnectivityLevel() == NetworkConnectivityLevel.InternetAccess; 
    return internet; 
} 

參見this question

相關問題