Aug 13th, 2010 by carrumba
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
using System;
using System.Text;
using System.Net;
namespace HostName2IP
{
class Program
{
static void Main(string[] args)
{
IPHostEntry lHost = Dns.GetHostByName("www.google.com");
IPAddress lIPAddr = lHost.AddressList[0];
Console.WriteLine(lIPAddr);
}
}
} |
posted in C#, Coders corner
Leave a comment
But please respect the commenting rules. Critizism is appreciated and also general comments of course. If you're rude, I have to delete your comment. Also use your personal/nick name but avoid using business names. Have fun and thanks for participating the discussion.