Ping an IP address

My.Computer.Network.Ping(targetSystem[, timeout])

targetSystem is a string IP address, a host name, or a System.Uri instance. The optional timeout argument is supplied in milliseconds and defaults to 500.

This method returns true if the ping is successful, or False on failure or no response.

To ping localhost for example you would have the following

My.Computer.Network.Ping(127.0.0.1timeout])

Get IP address

GetIP address with VB.net

Module Module1

Sub Main()
Dim h As System.Net.IPHostEntry = System.Net.Dns.GetHostByName(System.Net.Dns.GetHostName)
Console.WriteLine(CType(h.AddressList.GetValue(0), Net.IPAddress).ToString)
End Sub

End Module