Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

WebProxy Constructor (String, Int32)

.NET Framework 1.1

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

[Visual Basic]
Public Sub New( _
   ByVal Host As String, _
   ByVal Port As Integer _
)
[C#]
public WebProxy(
   string Host,
 int Port
);
[C++]
public: WebProxy(
   String* Host,
 int Port
);
[JScript]
public function WebProxy(
   Host : String,
 Port : int
);

Parameters

Host
The name of the proxy host.
Port
The port number on Host to use.

Exceptions

Exception Type Condition
UriFormatException The URI formed by combining Host and Port is not a valid URI.

Remarks

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

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework, Common Language Infrastructure (CLI) Standard

See Also

WebProxy Class | WebProxy Members | System.Net Namespace | WebProxy Constructor Overload List

Show:
© 2015 Microsoft