Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试在 c# 中使用 webclient 下载文件。
文件位置的远程端口是 20114。如何告诉 webclient 使用 20114 端口?
将网址设置为http://www.website.com:20114/folder/file.ext
我的自发猜测(没有尝试过)将简单地将其包含在 url 中:
WebClient client = new WebClient(); client.DownloadFile(@"http://host:20114/file.ext", localFilename);