我如何使用 C# 下载 URL 的内容,并将文本存储在字符串中,而不必将文件保存到硬盘?
最佳答案
string contents;
using (var wc = new System.Net.WebClient())
contents = wc.DownloadString(url);
关于c# - 从 URL 下载文件到字符串,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3231969/