Network::IsAvailable Property
.NET Framework (current version)
Indicates whether a computer is connected to a network.
Assembly: Microsoft.VisualBasic (in Microsoft.VisualBasic.dll)
Property Value
Type: System::BooleanTrue if the computer is connected to a network; otherwise False.
IsAvailable always returns False when called from a Click Once application or if the user does not have NetworkInformationPermission.
The following table lists examples of tasks involving the My.Computer.Network.IsAvailable property.
To | See |
Check whether a computer is connected to a network |
This example checks the property's status and reports it.
If My.Computer.Network.IsAvailable = True Then MsgBox("Computer is connected.") Else MsgBox("Computer is not connected.") End If
FileIOPermissionWebPermission
Controls the ability to access files and folders. Associated enumeration: Unrestricted.
Controls rights to access HTTP Internet resources. Associated enumeration: Unrestricted.
.NET Framework
Available since 2.0
Available since 2.0
Show: