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);

 }

```
I have a way that seems to work pretty decent, especially noticing sometimes Ethernet could appear to be in use even when its not in Windows 8 RTM... That's why nothing seems to work!

However, doing the following is a good choice for me to test...

```
    var profile = Windows.Networking.Connectivity.NetworkInformation.GetInternetConnectionProfile();

         var interfaceType = profile.NetworkAdapter.IanaInterfaceType;
            // 71 is WiFi & 6 is Ethernet
            if (interfaceType == 71 | interfaceType == 6) 
            {
              // Run Code
            }
            /* 3G/Mobile Detect
            else if (interfaceType == 243 | interfaceType == 244)
            {
              // Run Code if you need to use a less quality feature.
            }*/
            else
            {
                txtHeader.Text = "Error, Check connection or Try connecting to the Internet...";
            }

```