WebClient.Proxy 属性

定义

获取或设置此 WebClient 对象使用的代理。

public:
 property System::Net::IWebProxy ^ Proxy { System::Net::IWebProxy ^ get(); void set(System::Net::IWebProxy ^ value); };
public System.Net.IWebProxy? Proxy { get; set; }
public System.Net.IWebProxy Proxy { get; set; }
member this.Proxy : System.Net.IWebProxy with get, set
Public Property Proxy As IWebProxy

属性值

用于发送请求的 IWebProxy 实例。

注解

属性 Proxy 标识 IWebProxy 代表此 WebClient 对象与远程服务器通信的实例。 代理由系统使用配置文件和 Internet Explorer 局域网设置进行设置。 若要指定不应使用代理,请将 属性设置为 Proxynull

有关自动代理检测的信息,请参阅 自动代理检测

适用于

另请参阅