loader class : DownloadFile(string,string) method

Description

Downloads the resource with the specified URL to a local file.

Syntax

loaderInstance.DownloadFile(string targetUrl, string fileName)

Arguments

ClassNameDescription
stringtargetUrlURL.
stringfileNamePath of a file that will be saved.

Return value

None

Sample code

1:

loader loa = new loader();

2:

string targetUrl = "http://www...";

3:

string fileName = "c:\somewhere...";

4:

loa.DownloadFile(targetUrl,fileName);

Notes

It's a wrapper of the System.Net.WebClient.DownloadFile(String,String) method.

Links for reference

Copyright © Cooker All rights reserved.