测试网络连接正不正常
Public Shared Function CheckForInternetConnection() As Boolean Try Using client = New WebClient() Using stream = client.OpenRead("https://msdn.microsoft.com/") Return True End Using End Using Catch Return False End Try End Function
Public Shared Function CheckForInternetConnection() As Boolean Try Using client = New WebClient() Using stream = client.OpenRead("https://msdn.microsoft.com/") Return True End Using End Using Catch Return False End Try End Function