This documentation is archived and is not being maintained.

UriParser.Resolve Method

Called by Uri constructors and System.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
protected String Resolve (
	Uri baseUri, 
	Uri relativeUri, 
	/** @attribute OutAttribute() */ /** @ref */ UriFormatException parsingError
Not applicable.



A base URI.


A relative URI.


Errors during the resolve process, if any.

Return Value

The string of the resolved relative Uri.

Exception typeCondition


The baseUri parameter is not an absolute Uri.or the baseUri requires user-driven parsing.

Uri constructors and System.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.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0