Windows CE 5.0ライクOSを採用したバーコードスキャナ付きモバイルコンピュータHoneywell Dolphin 6100用のアプリケーションを開発しています。
ネットワーク接続の存在を確認できる機能を使いたいので、以下のコードを使用しようとしましたが、遅すぎます。
public static bool CheckForInternetConnection()
{
string url = "http://www.Microsoft.com/";
try
{
System.Net.WebRequest myRequest = System.Net.WebRequest.Create(url);
System.Net.WebResponse myResponse = myRequest.GetResponse();
}
catch (System.Net.WebException)
{
return false;
}
return true;
}
誰もがそれを行うためのより速い方法のアイデアを持っています. win7でVS2008を使用していることに言及します