title: How download files from List and show progress in progress bar
body: <p>In my app i have a list with links.</p>
  
  <pre><code> public List&lt;string&gt; Urls ()
      {
          var list = new List&lt;string&gt;();
          list.Add("http://example.com/image.jpg");
          list.Add("http://example.com/image1.jpg");
          list.Add("http://example.com/image2.jpg");
  
          return list;
      }
  </code></pre>
  
  <p>I use a webclient for downloading.</p>
  
  <pre><code> private void downloadAlbum_Click(object sender, EventArgs e)
  {
        foreach (var link in Urls())
           {
            using (var wc = new WebClient())
                  {
                      wc.DownloadFile(link.ToString(),fileName);
                  }
           }
  }
  </code></pre>
  
  <p>But, my winform is lagging. While WebClient do this work.
  Maybe anyone have a example for async function with multiple download and show current progress in progress bar?
  Update.
  I have async await for one file</p>
  
  <pre><code> private void Downloader(string link, string filepath)
      {
          using (WebClient wc = new WebClient())
          {
              wc.DownloadProgressChanged += Wc_DownloadProgressChanged;
              wc.DownloadFileCompleted += Wc_DownloadFileCompleted;
              wc.DownloadFileAsync(new Uri(link), filepath);
          }
      }
  
  private void Wc_DownloadProgressChanged(object sender, 
  DownloadProgressChangedEventArgs e)
      {
          progressBar.Value = e.ProgressPercentage;
      }
  
   private void Wc_DownloadFileCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e)
      {
          progressBar.Value = 0;
  
          if (e.Cancelled)
          {
              MessageBox.Show("Canceled", "Message", MessageBoxButtons.OK,MessageBoxIcon.Error);
              return;
          }
  
          if (e.Error != null) 
          {
              MessageBox.Show("Somethings wrong, check your internet","Message", MessageBoxButtons.OK,MessageBoxIcon.Error);
  
              return;
          }
  
          MessageBox.Show("Download is done!", "Message",MessageBoxButtons.OK,MessageBoxIcon.Information);
  
      }
  </code></pre>