using System.Runtime.InteropServices;
[DllImport("wininet.dll")]
private extern static bool InternetGetConnectedState(out int Description, int ReservedValue);
public static bool IsConnectedToInternet()
{
int Desc;
return InternetGetConnectedState(out Desc, 0);
}
반환값이 True면 해당 컴퓨터는 인터넷 연결된 겁니다.