K
kgm murugesh
Guest
I want to check internet connection is available in vb.net code.
I used the following code
Public Shared Function CheckForInternetConnection() As Boolean
Try
Using client = New WebClient()
Using stream = client.OpenRead("Google")
Return True
End Using
End Using
Catch
Return False
End Try
End Function
Sometimes it shows wrong result.
Continue reading...
I used the following code
Public Shared Function CheckForInternetConnection() As Boolean
Try
Using client = New WebClient()
Using stream = client.OpenRead("Google")
Return True
End Using
End Using
Catch
Return False
End Try
End Function
Sometimes it shows wrong result.
Continue reading...