Get Host by IP address : DNS : Network C# Examples


C# Examples » Network » DNS »

 

Get Host by IP address









    
using  System;
using  System.Net;

class  MainClass
{
      public  static  void  Main(string[]  argv)
      {
            IPAddress  test  =  IPAddress.Parse("64.200.123.1");

            IPHostEntry  iphe  =  Dns.GetHostByAddress(test);

            Console.WriteLine("Information  for  {0}",  test.ToString());

            Console.WriteLine("Host  name:  {0}",  iphe.HostName);
      }
}
    
   
  
   



Output

Information for 64.200.123.1
Host name: drvlga1wct1-atm1-0-0-12.wcg.net


HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Network
» DNS