如何从数组中下载C#中的多个文件。 [英] How to download multiple files in C# from array.

查看:78
本文介绍了如何从数组中下载C#中的多个文件。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有文件名的数组,我想从服务器下载它们,但是一旦我开始下载,它必须在我为新主题加注之前完成。如果循环在Download_COmpleted事件函数中,我不知道如何让它等待...


这是代码:

I have an array with filenames, and i want to download them from the server, but once i start a download, it must finish before i star a new one. I don''t know how to make it wait, provided that the loop is inside a Download_COmpleted event function...

Here is the code:

展开 | 选择 | Wrap | 行号

推荐答案

我在这里离开我的区域但是...

第4行看起来像一个异步下载方法。

有没有一个没有Aysnc?只是DownloadFile
I am WAY out of my area here but...
Line 4 looks like an Asynchronous download method.
Is there one just like it that doesn''t have the Aysnc? Just "DownloadFile"


是的,但那个没有连接Async进度条...
Yes, but that one doesn''t connect with the Async progress bar...



但是一旦我开始下载,它必须在我为新主题加注之前完成。
but once i start a download, it must finish before i star a new one.


是的,但是那个没有与Async进度条连接...
Yes, but that one doesn''t connect with the Async progress bar...



然后使用不同的进度条。

Then use a different progress bar.


这篇关于如何从数组中下载C#中的多个文件。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆