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

c++downloadfile

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

Best Solution

using (var client = new WebClient())
{
    client.DownloadFile("http://example.com/file/song/a.mpeg", "a.mpeg");
}