UriBuilder Constructor

UriBuilder Constructor

.NET Framework 1.1

Initializes a new instance of the UriBuilder class.

Overload List

Initializes a new instance of the UriBuilder class.

[Visual Basic] Public Sub New()
[C#] public UriBuilder();
[C++] public: UriBuilder();
[JScript] public function UriBuilder();

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

[Visual Basic] Public Sub New(String)
[C#] public UriBuilder(string);
[C++] public: UriBuilder(String*);
[JScript] public function UriBuilder(String);

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

[Visual Basic] Public Sub New(Uri)
[C#] public UriBuilder(Uri);
[C++] public: UriBuilder(Uri*);
[JScript] public function UriBuilder(Uri);

Initializes a new instance of the UriBuilder class with the specified scheme and host.

[Visual Basic] Public Sub New(String, String)
[C#] public UriBuilder(string, string);
[C++] public: UriBuilder(String*, String*);
[JScript] public function UriBuilder(String, String);

Initializes a new instance of the UriBuilder class with the specified scheme, host, and port.

[Visual Basic] Public Sub New(String, String, Integer)
[C#] public UriBuilder(string, string, int);
[C++] public: UriBuilder(String*, String*, int);
[JScript] public function UriBuilder(String, String, int);

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

[Visual Basic] Public Sub New(String, String, Integer, String)
[C#] public UriBuilder(string, string, int, string);
[C++] public: UriBuilder(String*, String*, int, String*);
[JScript] public function UriBuilder(String, String, int, String);

Initializes a new instance of the UriBuilder class with the specified scheme, host, port number, path and query string or fragment identifier.

[Visual Basic] Public Sub New(String, String, Integer, String, String)
[C#] public UriBuilder(string, string, int, string, string);
[C++] public: UriBuilder(String*, String*, int, String*, String*);
[JScript] public function UriBuilder(String, String, int, String, String);

Example

[Visual Basic, C#, C++] The following example creates a UriBuilder instance containing the URI http://www.contoso.com:8080/index.htm#top.

[Visual Basic, C#, C++] Note   This example shows how to use one of the overloaded versions of the UriBuilder constructor. For other examples that might be available, see the individual overload topics.
[Visual Basic] 
Dim myUri As New UriBuilder("http", "www.contoso.com", 8080, "index.htm", "#top")


[C#] 
UriBuilder myUri = new UriBuilder("http","www.contoso.com",8080,"index.htm","#top");


[C++] 
UriBuilder* myUri = new UriBuilder(S"http",S"www.contoso.com",8080,S"index.htm",S"#top");

[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter in the upper-left corner of the page.

See Also

UriBuilder Class | UriBuilder Members | System Namespace

Show:
© 2016 Microsoft