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
.