I've found a ton of tutorials, however they are all very old for 1.1 or 2.0; there must be an easier way now with .NET 3.5.
Care to share? :)
I've found a ton of tutorials, however they are all very old for 1.1 or 2.0; there must be an easier way now with .NET 3.5.
Care to share? :)
//To get a host with a www address
IPHostEntry ip = Dns.GetHostByName ("www.vbcity.com");
IPAddress [] IpA = ipE.AddressList;
for (int i = 0; i < IpA.Length; i++)
{
Console.WriteLine ("IP Address {0}: {1} ", i, IpA[i].ToString ());
}
//To get the local IP address
string sHostName = Dns.GetHostName ();
IPHostEntry ipE = Dns.GetHostByName (sHostName);
IPAddress [] IpA = ipE.AddressList;
for (int i = 0; i < IpA.Length; i++)
{
Console.WriteLine ("IP Address {0}: {1} ", i, IpA[i].ToString ());
}
Sources:
To verify you ip address you can try ip address