1

如何从网站获取 xml 文件并将其保存在电脑上。C# 的简单方法是什么?

4

1 回答 1

5

使用.NET 库中的WebClient

WebClient Client = new WebClient();
Client.DownloadFile("http://foo.bar", @"C:\filename.xml");
于 2009-10-08T11:34:58.807 回答