Category Archives: Network

Network Commands in VB.NET

A couple of useful network commands in Visual BASIC .NET (2005). These are the equivalents of doing ping and nslookup from the command prompt. The variable sIPAddress in these examples is a string containing the IP to test, i.e. "127.0.0.1"

Ping
My.Computer.Network.Ping(sIPAddress)
Nslookup
System.Net.Dns.GetHostEntry(sIPAddress).HostName


Advert: