Constructs and initializes a new instance of the UriBuilder class with the specified Uri instance.
- uri
- An instance of the Uri class.
Type Reason NullReferenceException uri is null .
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.
Namespace: System
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0