質問

I want to code a simple file downloader in C#. I want to know how it works? eg. If I give it a URL, what will it do? I have a very rough idea about it.

  1. It will send a HTTP request.
  2. The server will reply and send the file.
  3. The downloader will get the file and store it in hard drive.

This is my first time coding on web technology. So I hardly have any idea.
Can anybody please explain me the steps?

役に立ちましたか?

解決

A snippet to get you started:

using(var wc=new WebClient())
{
    wc.DownloadFile("http://some/internet/resource",@"c:\some\local\filename");
}
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top