title: How to verify is there is a good internet connection in C#?
body: <p>I am trying to create a Windows Store App, that performs several avtivities that requires internet connectivity.
  My code handles a no internet connectivity by storing data in a temporary SQLite DB, but only when there is no internet connection. Something like this:</p>
  
  <pre><code>    // C#
      public bool isInternetConnected()
      {
  
          ConnectionProfile conn = NetworkInformation.GetInternetConnectionProfile();
          bool isInternet = conn != null &amp;&amp; conn.GetNetworkConnectivityLevel() == NetworkConnectivityLevel.InternetAccess;
          return isInternet;
      }
  </code></pre>
  
  <p>Now, my problem is when I have a bad internet connection. My task will timeout, I will either have to handle the timeout or modify this method.</p>
  
  <p>Does anybody has a good way to handle this????</p>