title: How to use progress bar with parallel.foreach?
body: <p>I have number of files to be downloaded and I have used Parallel.foreach in C#. It is working fine. Now I want to check the progress of download using progressbar. How is this possible?</p>
  
  <p>I have used this code:  </p>
  
  <pre><code>Parallel.For(0, numofitems, options, j =&gt;
  {
     using (WebClient client = new WebClient())
     {
         client.DownloadProgressChanged += new DownloadProgressChangedEventHandler(client_DownloadProgressChanged);
  
         client.DownloadFile(list[j], @"F:\Test\Test2\a" + j + ".png"); 
     }
  }
  </code></pre>