Share via


Uri Constructor (String)

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

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

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

Syntax

'Declaration
Public Sub New ( _
    uriString As String _
)
public Uri(
    string uriString
)
public:
Uri(
    String^ uriString
)
new : 
        uriString:string -> Uri
public function Uri(
    uriString : String
)

Parameters

Remarks

This constructor creates a Uri instance from a URI string. It parses the URI, puts it in canonical format, and makes any required escape encodings.

This constructor does not ensure that the Uri refers to an accessible resource.

This constructor assumes that the string parameter references an absolute URI and is equivalent to calling the Uri constructor with UriKind set to Absolute. If the string parameter passed to the constructor is a relative URI, this constructor will throw a UriFormatException.

.NET Framework Security

See Also

Reference

Uri Class

Uri Overload

System Namespace