0
Q:

check connection c#

System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable()
0
public static bool CheckForInternetConnection()
{
    try
    {
        using (var client = new WebClient())
            using (client.OpenRead("http://google.com/generate_204")) 
                return true; 
    }
    catch
    {
        return false;
    }
}
1

New to Communities?

Join the community