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.
如何从网站获取 xml 文件并将其保存在电脑上。C# 的简单方法是什么?
使用.NET 库中的WebClient:
WebClient Client = new WebClient(); Client.DownloadFile("http://foo.bar", @"C:\filename.xml");