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