Get Alias from IPHostEntry : IP Address : Network C# Examples


C# Examples » Network » IP Address »

 

Get Alias 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(string  alias  in  iphe.Aliases)
            {
                  Console.WriteLine("Alias:  {0}",  alias);
            }
      }
}
    
   
  
   




HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Network
» IP Address