GlobalProxySelection.GetEmptyWebProxy 方法

定义

返回一个空的代理实例。

public:
 static System::Net::IWebProxy ^ GetEmptyWebProxy();
public static System.Net.IWebProxy GetEmptyWebProxy();
static member GetEmptyWebProxy : unit -> System.Net.IWebProxy
Public Shared Function GetEmptyWebProxy () As IWebProxy

返回

IWebProxy不包含任何信息。

注解

该方法 GetEmptyWebProxy 返回一个空白 IWebProxy 实例,指示没有代理用于访问 Internet 资源。

可以分配给GetEmptyWebProxy属性等null成员,而不是调用WebClient.Proxy该方法,该属性指定代表对象与远程服务器通信的WebClient代理。

适用于