Question: Anyone know a good way to see if the user is online/offline? When I use public static bool IsConnectedToNetwork(); and see if it's false/true it seems to always be true, even when I shut down my internet to test it...

Am I missing something?

```
public static bool nets()
{
    bool go = 
        System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable();

    if (go == false)
    {
        return false;  
    }
    return true;
}

```

Now, in my start-up I run:

```
var ba = nets();

if (ba == false)
{
    txtHeader.Text = "err";
}
if (ba != false)
{
    // Code
}

```

I also tried:

```
    public static bool IsConnectedToNetwork();

```

Answer: 
I use

```
public static bool IsConnectedToInternet()
{
    ConnectionProfile connectionProfile = NetworkInformation.GetInternetConnectionProfile();
    return (connectionProfile!=null && connectionProfile.GetNetworkConnectivityLevel() == NetworkConnectivityLevel.InternetAccess);

 }

```
You could ping one of the few well known URLs to see if you get responses.