Mono Class Library: System.UriBuilder Overview | Members

System.UriBuilder Constructor

Constructs and initializes a new instance of the UriBuilder class with the specified scheme, host, port number, and path.

public UriBuilder (string scheme, string host, int port, string pathValue)

Parameters

scheme
A string containing the name of an Internet access protocol.
host
A string containing a DNS host name or IP address.
port
A int containing an IP port number.
pathValue
A string containing the path for the resource.

Exceptions

TypeReason
ArgumentOutOfRangeExceptionport is less than zero.

Remarks

This constructor creates a new instance of the UriBuilder class with its properties initialized as follows:

PropertyInitial value
Fragmentstring.Empty
Hosthost
Passwordstring.Empty
PathpathValue
Portport
Querystring.Empty
Schemescheme
UserNamestring.Empty

Before setting the UriBuilder.Path property, this constructor converts any backward slashes in pathValue to forward slashes, and calls Uri.EscapeString(string)(pathValue).

Requirements

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