C# 判断计算机网络是否可用
来源:互联网 发布:unity3d 对话框 编辑:程序博客网 时间:2024/06/01 22:58
using System.Runtime.InteropServices;
代码:
[DllImport("wininet.dll")]
private extern static bool InternetGetConnectedState(out int connectionDescription, int reservedValue);
private static bool IsConnected()
{
int I = 0;
bool state = InternetGetConnectedState(out I, 0);
return state;
}
使用方法:
textBox1.Text = IsConnected().ToString();
- C# 判断计算机网络是否可用
- C#判断打印机是否可用
- c# 判断当前网络是否可用
- 判断webservice是否可用
- 判断窗口是否可用
- 判断网络是否可用
- 判断网络是否可用
- 判断用户名是否可用
- 判断网络是否可用
- 判断网络是否可用
- 判断网络是否可用
- 判断网络是否可用
- 判断网络是否可用
- 判断网络是否可用
- 判断网络是否可用
- 判断网络是否可用
- 判断网络是否可用
- 判断网络是否可用
- 系统权限设计
- Asp.NET 操作配置文件
- Ext.form.ComboBox 属性详解及使用方法介绍和级联使用
- 新手上路多多指教
- 在asp.net中为Web用户控件添加属性和事件
- C# 判断计算机网络是否可用
- Asp.net与SQL一起打包部署安装
- ExtJs2.0学习系列(5)--Ext.FormPanel之第二式
- 轻松掌握删除oracle10g垃圾表的最新方法
- Visual C#中的数据绑定(转贴)
- jsp自定义标签的使用(转)
- 说说VDSP5
- ASP.NET中存储过程的简单使用
- How can I overload the prefix and postfix forms of operators ++ and --