ToString Method
Collapse the table of content
Expand the table of content

UriBuilder.ToString Method

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

Returns the display string for the specified UriBuilder instance.

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

public override string ToString()

Return Value

Type: System.String
The string that contains the unescaped display string of the UriBuilder.

ExceptionCondition
UriFormatException

The URI constructed by the UriBuilder properties has a bad username and password (the UserName property is null or an empty string, but the Password property is not empty.

The display string always contains the Port property value, even if it is the default port for the Scheme. The string returned by the Uri.ToString method only contains the port if it is not the default port for the scheme.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft