System.Net.IPHostEntry.HostName Property

Gets or sets the DNS name of the host.

Syntax

public string HostName { get; set; }

Value

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

Remarks

The IPHostEntry.HostName 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 IPHostEntry.Aliases property.

Requirements

Namespace: System.Net
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0