Created
February 27, 2018 05:48
-
-
Save talkingdotnet/94b7fbea397dee5b26c22bcbbb6973c3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private bool DownloadFile(string url, string filePath) | |
{ | |
bool bResult = true; | |
try | |
{ | |
WebClient Client = new WebClient(); | |
Client.DownloadFile(url, filePath); | |
WriteToConsole("File Downloaded successfully"); | |
} | |
catch (Exception ex) | |
{ | |
WriteToConsole("Error: DownloadFile()" + "\n" + ex.ToString()); | |
bResult = false; | |
} | |
return bResult; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment