Work with `My` namespace
We can use My.Computer.Network.IsAvailable in Visual Basic.NET to determine whether the network is connected. The definition of this property is:
'''**********************************************************************
''';IsAvailable
''' <summary>
''' Indicates whether or not the local machine is connected to an IP network.
''' </summary>
''' <value>True if connected, otherwise False</value>
''' <remarks></remarks>
Public ReadOnly Property IsAvailable() As Boolean
Get
Return NetInfoAlias.NetworkInterface.GetIsNetworkAvailable()
End Get
End Property
It leads to the approach in C#. Continue reading “Querying Network Status in .NET programming”
