Get Host by IP adress
Shows how to retrieve the hostname from a given IP adress.
Author:
Jonas John
License:
Public domain
Language:
C#
Created:
08/09/2007
Updated:
08/09/2007
Tags:
network, host, example, dns
string IPAdress = "127.0.0.1"; IPHostEntry IPHostEntryObject = Dns.GetHostEntry(IPAdress); Console.WriteLine(IPHostEntryObject.HostName);