我想使用代理连接下载文件。我的示例代码是:
WebClient client = new WebClient();
WebProxy wp = new WebProxy("url_proxy_server");
//wp.Credentials = new NetworkCredential("id", "pass", "domain");
client.Proxy = wp;
client.DownloadFile("http:mylink", "Save Path");
这是正确的下载模式吗?我如何设置端口号?