Network.IsAvailable Property


Indicates whether a computer is connected to a network.

 property bool IsAvailable { bool get(); };
public bool IsAvailable { get; }
member this.IsAvailable : bool
Public ReadOnly Property IsAvailable As Boolean

Property Value

True if the computer is connected to a network; otherwise False.


This example checks the property's status and reports it.

If My.Computer.Network.IsAvailable = True Then
    MsgBox("Computer is connected.")
    MsgBox("Computer is not connected.")
End If


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 How to: Check Connection Status

Applies to

See also