UriBuilder Constructor (String)

UriBuilder Constructor (String)

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

Initializes a new instance of the UriBuilder class with the specified URI.

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

public UriBuilder(
	string uri
)

Parameters

uri
Type: System.String
A URI string.

ExceptionCondition
ArgumentNullException

uri is null.

UriFormatException

uri is a zero length string or contains only spaces.

-or-

The parsing routine detected a scheme in an invalid form.

-or-

The parser detected more than two consecutive slashes in a URI that does not use the "file" scheme.

-or-

uri is not a valid URI.

This constructor initializes a new instance of the UriBuilder class with the Fragment, Host, Path, Port, Query, Scheme, and Uri properties set as specified in uri.

If uri does not specify a scheme, the scheme defaults to "http:".

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft