using System.Net;
string HostName = Dns.GetHostName(); //for local machine
public string GetIPAddress(string HostName)
{
IPHostEntry ipHostEntry = Dns.GetHostByName(HostName);
IPAddress [] addres = ipHostEntry.AddressList;
string IPAddress = addres[0].ToString();
return IPAddress;
}
Thursday, September 10, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment