title: Why i'm getting error Cannot await 'void'?
body: <pre><code>private Queue&lt;string&gt; _downloadUrls = new Queue&lt;string&gt;();
  
          private void downloadFile(IEnumerable&lt;string&gt; urls)
          {
              foreach (var url in urls)
              {
                  _downloadUrls.Enqueue(url);
              }
  
              DownloadFile();
          }
  
          private async Task DownloadFile()
          {
              if (_downloadUrls.Any())
              {
                  WebClient client = new WebClient();
                  client.DownloadProgressChanged += ProgressChanged;
                  client.DownloadFileCompleted += Completed;
  
                  var url = _downloadUrls.Dequeue();
                  string FileName = url.Substring(url.LastIndexOf("/") + 1,
                              (url.Length - url.LastIndexOf("/") - 1));
  
                  await client.DownloadFileAsync(new Uri(url), "C:\\Test4\\" + FileName);
                  return;
              }
          }
  </code></pre>
  
  <p>The error is on the line:</p>
  
  <pre><code>await client.DownloadFileAsync(new Uri(url), "C:\\Test4\\" + FileName);
  </code></pre>
  
  <p>How can i solve the error ?
  Why it happen ?
  I gave all the details i think.</p>
  
  <p>I added the rest of the code maybe it needed.</p>