UriParser.Resolve Method
Microsoft Silverlight will reach end of support after October 2021. Learn more.
Called by Uri constructors and Uri.TryCreate() to resolve a relative URI.
Namespace: System
Assembly: System (in System.dll)
Syntax
'Declaration
Protected Overridable Function Resolve ( _
baseUri As Uri, _
relativeUri As Uri, _
<OutAttribute> ByRef parsingError As UriFormatException _
) As String
protected virtual string Resolve(
Uri baseUri,
Uri relativeUri,
out UriFormatException parsingError
)
Parameters
- baseUri
Type: System.Uri
A base URI.
- relativeUri
Type: System.Uri
A relative URI.
- parsingError
Type: System.UriFormatException%
Errors during the resolve process, if any.
Return Value
Type: System.String
The string of the resolved relative Uri.
Exceptions
Exception | Condition |
---|---|
InvalidOperationException | baseUri parameter is not an absolute Uri - or - baseUri parameter requires user-driven parsing. |
Remarks
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.
Version Information
Silverlight
Supported in: 5, 4, 3
Silverlight for Windows Phone
Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0
XNA Framework
Supported in: Xbox 360, Windows Phone OS 7.0
Platforms
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.