Click here to Skip to main content
Click here to Skip to main content
Alternative Tip

Checking Internet Is Connected Or Not From .NET

, 27 May 2011
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)

About the Author

Anshul R
Student
India India
No Biography provided

Comments and Discussions

 
GeneralReason for my vote of 5 best code Pinmemberbeginner201127-Dec-11 15:31 
GeneralReason for my vote of 1 best & easiest & managed code PinmemberKraeven6-Dec-11 22:33 
GeneralRe: I think you voted 1 for this accidentally(Based on your comm... Pinmvpthatraja26-Dec-11 20:15 
GeneralReason for my vote of 5 This is the absolute simplest method... PinmemberBryan@DataLabs6-Dec-11 6:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    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 | Mobile
Web02 | 2.8.140721.1 | Last Updated 27 May 2011
Article Copyright 2011 by Anshul R
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid