Host Property

Uri.Host Property

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Gets the host component of this instance.

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

public string Host { get; }

Property Value

Type: System.String
A String that contains the host name. This is usually the DNS host name or IP address of the server.

ExceptionCondition
InvalidOperationException

This property is valid only for an absolute Uri instance.

The Host property gets the host component of this Uri instance. This property value does not include the port number.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2016 Microsoft