.NET Framework 4.6 and 4.5
Gets the Domain Name System (DNS) host name or IP address and the port number for a server.
Public ReadOnly Property Authority As String
System .String A containing the authority component of the URI represented by this instance. String
Exception Condition InvalidOperationException
This instance represents a relative URI, and this property is valid only for absolute URIs.
property is typically a server DNS host name or IP address. This property might include the service port number if it differs from the default port for the URI. If the Authority component contains reserved characters, these are escaped in the string value returned by this property. Authority
The following example writes the host name (www.contoso.com) and port number (8080) of the server to the console.
Dim baseUri As New Uri( "http://www.contoso.com:8080/")
Dim myUri As New Uri(baseUri, "shownew.htm?date=today")
Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1
.NET Framework Client Profile
Supported in: 4, 3.5 SP1
Supported in: 3.0, 2.0, 1.0
.NET for Windows Phone apps
Supported in: Windows Phone 8.1, Windows Phone Silverlight 8.1, Windows Phone Silverlight 8
Portable Class Library
Supported in: Portable Class Library
( 1500 characters remaining)
Thank you for your feedback