How do you resolve a domain name to an IP address with .NET/C#?
Try using the System.Net.Dns class
using System.Net;
foreach (IPAddress address in Dns.GetHostAddresses("www.google.com"))
{
Console.WriteLine(address.ToString());
}
Try using the System.Net.Dns class
using System.Net;
foreach (IPAddress address in Dns.GetHostAddresses("www.google.com"))
{
Console.WriteLine(address.ToString());
}