Get IPAddress from IPHostEntry : DNS : Network C# Examples


C# Examples » Network » DNS »

 

Get IPAddress from IPHostEntry









    
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);

            foreach(IPAddress  address  in  iphe.AddressList)
            {
                  Console.WriteLine("Address:  {0}",  address.ToString());
            }
      }
}
    
   
  
   



Output

Address: 64.200.123.1


HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Network
» DNS