Mono Class Library: System.UriBuilder Overview | Members

System.UriBuilder Constructor

Constructs and initializes a new instance of the UriBuilder class with the specified Uri instance.

public UriBuilder (Uri uri)

Parameters

uri
An instance of the Uri class.

Exceptions

TypeReason
NullReferenceExceptionuri is null .

Remarks

The components of the specified Uri instance are used to initialize the properties of the UriBuilder instance being constructed.

If uri.Fragment is not equal to string.Empty, uri.Fragment is copied to the UriBuilder.Fragment property of the current instance, otherwise uri.Query is copied to the UriBuilder.Query property of the current instance.

The Host, Port and Scheme properties of the Uri instance are used to initialize the corresponding properties in the current instance. The AbsolutePath property of the Uri instance is used to initialize the Path property of the current instance.

The UserInfo property of the Uri instance is used to initialize the UserName and Password properties of the current instance.

Requirements

Namespace: System
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0