Showing posts with label DNS. Show all posts
Showing posts with label DNS. Show all posts

Sunday, August 8, 2010

How to get IP Address and Hostname in C#

string HostName = Dns.GetHostName();
string strIpaddress = Dns.GetHostByName(HostName).AddressList[0].ToString();