Share via


HostName Property

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Gets or sets the DNS name of the host.

Namespace:  System.Net
Assembly:  System (in System.dll)

Syntax

'Declaration
Public ReadOnly Property HostName As String
public string HostName { get; }
public:
property String^ HostName {
    String^ get ();
}
member HostName : string with get
function get HostName () : String

Property Value

Type: System. . :: . .String
A string that contains the primary host name for the server.

Remarks

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

.NET Framework Security

See Also

Reference

IPHostEntry Class

System.Net Namespace