C# IPHostEntry Aliases

Description

IPHostEntry Aliases Gets or sets a list of aliases that are associated with a host.

Syntax

IPHostEntry.Aliases has the following syntax.


public string[] Aliases { get; set; }

Example


using System;/*  w  ww .j  a v  a 2  s  .com*/
using System.Net;
using System.Net.Sockets;

public class Example
{
   public static void Main()
   {

       IPHostEntry hostInfo = Dns.GetHostByName("google.com");
       Console.WriteLine(hostInfo.Aliases);
    
   }
}

The code above generates the following result.





















Home »
  C# Tutorial »
    System.Net »




Cookie
Dns
IPAddress
IPEndPoint
IPHostEntry
WebClient