How to download a file from a URL in C#?


Question

What is a simple way of downloading a file from a URL path?

1
311
1/14/2016 10:05:47 PM

using (var client = new WebClient())
{
    client.DownloadFile("http://example.com/file/song/a.mpeg", "a.mpeg");
}
428
4/28/2015 8:41:46 PM

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Icon