Freigeben über


WebProxy-Konstruktor (String)

Initialisiert eine neue Instanz der WebProxy-Klasse mit dem angegebenen URI.

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

Syntax

'Declaration
Public Sub New ( _
    Address As String _
)
'Usage
Dim Address As String

Dim instance As New WebProxy(Address)
public WebProxy (
    string Address
)
public:
WebProxy (
    String^ Address
)
public WebProxy (
    String Address
)
public function WebProxy (
    Address : String
)

Parameter

  • Address
    Der URI des Proxyservers.

Ausnahmen

Ausnahmetyp Bedingung

UriFormatException

Address ist ein ungültiger URI.

Hinweise

Bei der Initialisierung der WebProxy-Instanz wird die Address-Eigenschaft auf eine Uri-Instanz mit Address festgelegt.

Beispiel

Im folgenden Codebeispiel wird das Aufrufen dieses Konstruktors veranschaulicht.

public static WebProxy CreateProxyWithHost()
{
    return new WebProxy("http://contoso");
}
WebProxy^ CreateProxyWithHost()
{
   return gcnew WebProxy( "http://contoso" );
}
public static WebProxy CreateProxyWithHost()
{
    return new WebProxy("http://contoso");
} //CreateProxyWithHost

Plattformen

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile für Pocket PC, Windows Mobile für Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.

Versionsinformationen

.NET Framework

Unterstützt in: 2.0, 1.1, 1.0

.NET Compact Framework

Unterstützt in: 2.0, 1.0

Siehe auch

Referenz

WebProxy-Klasse
WebProxy-Member
System.Net-Namespace