<p>How do you resolve a domain name to an IP address with .NET/C#?</p>

```
```
using System.Net;

foreach (IPAddress address in Dns.GetHostAddresses("www.google.com"))
{
   Console.WriteLine(address.ToString());
}
```
```