Networking System [00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ] 1.0.x.x 1.0.5000.0 2.0.0.0 4.0.0.0 All public static members of this type are safe for multithreaded operations. No instance members are guaranteed to be thread safe. System.Object

The following example queries the DNS database for information on the host "www.contoso.com" and displays the information in the returned instance.

`using System; using System.Net; public class IPHostEntryTest { public static void Main() { IPHostEntry hostInfo = Dns.GetHostByName("www.contoso.com"); string[] aliases = hostInfo.Aliases; IPAddress[] addresses = hostInfo.AddressList; Console.WriteLine("The host name is: {0}", hostInfo.HostName); for(int x = 0; x < aliases.Length; x++) Console.WriteLine("Alias {0} == {1}", aliases[x], addresses[x]); } }`

The output is

The host name is: contoso.com

Alias www.contoso.com == 207.46.230.186

The class associates a Domain Name System (DNS) host name with an array of aliases and an array of matching IP addresses.

The class is used as a helper class with the class.

Provides a container class for Internet host address information.

- Constructor
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  To be added.

  Initializes a new instance of the class.

  0
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Net.IPAddress[]

  A array containing IP addresses that resolve to the host names contained in the property.

  To be added.

  Gets or sets a list of IP addresses that are associated with a host.

  0
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String[]

  A array containing DNS names that resolve to the IP addresses in the property.

  To be added.

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

  0
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String

  A containing the DNS host name that corresponds to the address and alias information contained in the current instance.

  The property contains the primary host name for a server. If the DNS entry for the server defines additional aliases, they will be available in the property.

  Gets or sets the DNS name of the host.

  0
0