Network.IsAvailable Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Indicates whether a computer is connected to a network.
public:
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
.
Examples
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
Remarks
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
Σχόλια
https://aka.ms/ContentUserFeedback.
Σύντομα διαθέσιμα: Καθ' όλη τη διάρκεια του 2024 θα καταργήσουμε σταδιακά τα ζητήματα GitHub ως μηχανισμό ανάδρασης για το περιεχόμενο και θα το αντικαταστήσουμε με ένα νέο σύστημα ανάδρασης. Για περισσότερες πληροφορίες, ανατρέξτε στο θέμα:Υποβολή και προβολή σχολίων για