title: How to check if file download is complete
body: <p>What I am trying to do is download a file from a web page. Once the file is done downloading, I'll have it print something to the screen. </p>
  
  <pre><code>using HtmlAgilityPack;
  using NAudio.Wave;
  using System;
  using System.Collections.Generic;
  using System.ComponentModel;
  using System.IO;
  using System.Linq;
  using System.Net;
  using System.Text;
  using System.Threading.Tasks;
  
  namespace ConsoleApplication25
  {
  class Program
  {
      static void Main(string[] args)
      {
  
          Uri remoteUri = new Uri("http://soundcloud.com/dubstep/spag-heddy-the-master-vip/download");
          string fileName1 = "t", myStringWebResource = null;
  
          // Create a new WebClient instance.
          using (WebClient myWebClient = new WebClient())
          {
              myStringWebResource = remoteUri + fileName1;
              // Download the Web resource and save it into the current filesystem folder.
              myWebClient.DownloadStringCompleted += new DownloadStringCompletedEventHandler(Url1_DownloadStringCompleted);
              myWebClient.DownloadFileAsync(remoteUri, fileName1);
  
          }
  }
  public static void Url1_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e)
      {
          if (e.Error != null)
              return;
          yes();
      }
      public static void yes()
      {
          Console.WriteLine("RRRR");
          Console.Read();
      }
  }
  }
  </code></pre>
  
  <p>Where I run in to a problem is with <code>myWebClient.DownloadFileAsync(remoteUri, fileName1);</code> I'm not sure what I should have there instead of what is there. I have also verified that <code>myWebClient.DownloadFile</code> works.</p>