Question

In my application, I should get the domain names of the few IP Addresses I give as Input. I guess this process is called NSLOOKUP. However, I would like to confirm if I'm right. Simple program to implement this and display a MessageBox output is what I look for.

Contributions please...

Thank you in anticipation

Was it helpful?

Solution

IPAddress address = IPAddress.Parse("127.0.0.1");
IPHostEntry entry = Dns.GetHostEntry(address );
Console.WriteLine(entry.HostName);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top