Check internet connection (availability) in Windows 8

c#, microsoft-metro, windows-8

Solution

I use this snippet without problems:

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

Problem

How to check internet connection availability in Windows 8,C# development ? I looked at MSDN but page has been deleted.

Original source

Related problems