title: check internet connection available or not in c#
body: <p>I am using below method to check internet connection available or not in c#
  and I was using it from <a href="https://stackoverflow.com/questions/2031824/what-is-the-best-way-to-check-for-internet-connectivity-using-net">What is the best way to check for Internet connectivity using .NET?</a></p>
  
  <pre><code> public static bool CheckForInternetConnection()
      {
          try
          {
              using (var client = new WebClient())
              using (var stream = client.OpenRead("http://www.google.com"))
              {
                  return true;
              }
          }
          catch
          {
              return false;
          }
      }
  </code></pre>
  
  <p>above method works but I am facing problem, some time it takes a long time to rerun value, may be internet speed, but when I open Google.com in web browser then link open in a second, so why it is taking time to get result from C#</p>