Check Your Internet Connection With C#[1]

[入库:2005年8月18日] [更新:2007年3月25日]

本文简介:选择自 rcom10002 的 blog

check your internet connection with c#
by simohamed attahri

c#检测你的网络连接


how to check if your computer is connected to the internet with c#. it's much more easier that other tutorials i've seen in other sites. in deed, we're going to use a simple api function
internetgetconnectedstate, to return a boolean variable.

怎么用c#来检测你的计算机是否连接到互联网呢?这可能是我见过最简单的教程了。其实我们就是使用一个简单的internetgetconnectedstate api函数,结果是返回一个boolean类型的变量。

this function takes two arguments :

这个函数有两个参数:

the first one is an integer used with out keyword, that means that after calling the function, the variable will contain an interger that describes the connection state ( use of a modem, use of a proxy, offline mode...). note that you must refer to www.msdn.com for more information about that.

本文关键:Check Your Internet Connection With C#
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top