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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see dd66cd4c-b087-415f-9c3e-94e3a1835f74.