Here is a tool for you to check if internet connection available or not. The tool uses below code for connection detection:
Download Zip
private bool IsInternetAvailable() { bool ret = false; try { HttpWebRequest req = (HttpWebRequest) HttpWebRequest.Create("http://www.google.com/"); HttpWebResponse res = (HttpWebResponse)req.GetResponse(); if (res.StatusCode == HttpStatusCode.OK) { ret = true; } else { ret = false; } res.Close(); } catch { ret = false; } return ret; }
|
|
|
  |
|
|
|
|
Responses
0 Respones to "Check Internet connection notifier"
Post a Comment