判断本地的电脑是否与Internet网络连接
using System;
using System.Runtime.InteropServices;
namespace MyAssist
{
/// <summary>
/// netstat 的摘要说明。
/// </summary>
public class netstat
{
[DllImport("wininet.dll")]
private extern static bool InternetGetConnectedStat
public bool IsConnected()
{
int I=0;
bool state = InternetGetConnectedStat
return state;
}
}
}

浙公网安备 33010602011771号