Search code examples
c#.netimage

How do I programmatically save an image from a URL?


How do I programmatically save an image from a URL? I am using C# and need to be able grab images from a URL and store them locally. ...and no, I am not stealing :)


Solution

  • It would be easier to write something like this:

    WebClient webClient = new WebClient();
    webClient.DownloadFile(remoteFileUrl, localFileName);