简单图片下载
private void StartDownload(string URL, string filename)
{
try
{
WebRequest myre = WebRequest.Create(URL);
}
catch (WebException exp)
{
MessageBox.Show(exp.Message, "Error");
}
try
{
WebClient client = new WebClient();
client.DownloadFile(URL, filename + ".jpg");
}
catch (WebException exp)
{
MessageBox.Show(exp.Message, "Error");
}
}