×
Home About Us Products Services News Free Scripts Contact
news php scripts and software

C# (C Sharp) example - How to get the host name from an IP address?


C# (C Sharp) - How to get the host name from an IP address?

The method listed below returns the IP associated with
a specific host name passed by a parameter.

public string getHost(string ip)
{

		IPHostEntry IpEntry = Dns.GetHostByAddress(ip);
		return iphostentry.HostName.ToString();
}

Category: C# (C Sharp)

 
<< Go back