Click here to Skip to main content
12,064,812 members (42,524 online)
Click here to Skip to main content
Add your own
alternative version

Stats

4.2K views
3 bookmarked
Posted

Checking Internet Is Connected Or Not From .NET

, 27 May 2011 CPOL
Rate this:
Please Sign up or sign in to vote.
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 -...
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 - "www.google.com"
timeout (Int32). Time threshold in milliseconds for contacting the destination. Default is 500.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Anshul R
Student
India India
No Biography provided

You may also be interested in...

Comments and Discussions

 
GeneralReason for my vote of 5 best code Pin
beginner201127-Dec-11 16:31
memberbeginner201127-Dec-11 16:31 
GeneralReason for my vote of 1 best & easiest & managed code Pin
Kraeven6-Dec-11 23:33
memberKraeven6-Dec-11 23:33 
GeneralRe: I think you voted 1 for this accidentally(Based on your comm... Pin
thatraja26-Dec-11 21:15
mvpthatraja26-Dec-11 21:15 
GeneralReason for my vote of 5 This is the absolute simplest method... Pin
Bryan@DataLabs6-Dec-11 7:55
memberBryan@DataLabs6-Dec-11 7:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.160204.4 | Last Updated 27 May 2011
Article Copyright 2011 by Anshul R
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid