Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

UriParser.Resolve Method

Called by Uri constructors and Uri.TryCreate() to resolve a relative URI.

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

protected virtual string Resolve(
	Uri baseUri,
	Uri relativeUri,
	out UriFormatException parsingError


Type: System.Uri

A base URI.

Type: System.Uri

A relative URI.

Type: System.UriFormatException

Errors during the resolve process, if any.

Return Value

Type: System.String
The string of the resolved relative Uri.


baseUri parameter is not an absolute Uri

- or -

baseUri parameter requires user-driven parsing.

Uri constructors and Uri.TryCreate() use Resolve to construct a URI from baseUri and relativeUri.

If a parsing error occurs, the returned string for the resolved relative Uri is null.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Supported in: Windows Phone 8.1

Supported in: Windows Phone Silverlight 8.1

Supported in: Windows Phone Silverlight 8
© 2015 Microsoft