Help
我想要在.NET里面实现将网上一个已知路径的图片下载,并保存到本地,代码如下:
using System;
using System.Collections.Generic;
using System.Net;
namespace Download
{
class Program
{
static void Main(string[] args)
{
WebClient webClient = new WebClient();
webClient.DownloadFile("http://localhost/images/dog.jpg","D:\\dog.jpg");
}
}
}
但是调试时出现这样的错误,说“未处理的WebException,远程返回服务器错误:(404)未找到”,实在是不懂,求热心人帮忙啊~