Answers for "c# download file"

C#
4

c# copy file

File.Copy(Path.Combine(sourceDir, fName), Path.Combine(distDir, fName));
Posted by: Guest on May-05-2020
5

c# download file

using System.Net;

using (WebClient web1 = new WebClient())
	web1.DownloadFile("URL", "FileName");
}
Posted by: Guest on March-02-2020
0

c# download file

string remoteUri = "http://www.contoso.com/library/homepage/images/";
string fileName = "ms-banner.gif", myStringWebResource = null;

// Create a new WebClient instance.
using (WebClient myWebClient = new WebClient())
{
    myStringWebResource = remoteUri + fileName;
    // Download the Web resource and save it into the current filesystem folder.
    myWebClient.DownloadFile(myStringWebResource, fileName);        
}
Posted by: Guest on May-07-2021

C# Answers by Framework

Browse Popular Code Answers by Language