WebProxy Constructor (String, Int32)

 

Initializes a new instance of the WebProxy class with the specified host and port number.

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

new : 
        Host:string *
        Port:int -> WebProxy

Parameters

Host
Type: System.String

The name of the proxy host.

Port
Type: System.Int32

The port number on Host to use.

Exception Condition
UriFormatException

The URI formed by combining Host and Port is not a valid URI.

The WebProxy instance is initialized with the Address property set to a Uri instance of the form http:// Host : Port.

The following code example demonstrates calling this constructor.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show: