Perform DNS Lookup To Get IP Address

how would I perform a DNS lookup to get the IP address of the selected hostname.
for example hostname: google.com to get ip address: 74.125.230.142

In C#, use the Dns Class:

This method will block until a result is found. This can block your program if no dns resolution is available (e.g. no network).