Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles
(untagged)

Checking Internet Is Connected Or Not From .NET

0.00/5 (No votes)
27 May 2011 1  
Dim value As Boolean = My.Computer.Network.IsAvailable can be used in a situation where the only network a system will be connected to is the Internet.Dim value As Boolean = My.Computer.Network.Ping(hostNameOrAddress ,timeout) hostNameOrAddress can be any valid website -...
VB
Dim value As Boolean = My.Computer.Network.IsAvailable
can be used in a situation where the only network a system will be connected to is the Internet.
VB
Dim value As Boolean = My.Computer.Network.Ping(hostNameOrAddress ,timeout) 

hostNameOrAddress can be any valid website - "www.google.com"
timeout (Int32). Time threshold in milliseconds for contacting the destination. Default is 500.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here