File.Delete the process cannot access the file because it is being used by another process
问题 public bool DownloadMp3File (DownloadedMp3 mp3) { WebClient client = new WebClient (); string filePath = ""; bool wasDownload = false; try { string song = mp3.SongName; filePath = @"mp3\" + song + ".mp3"; if (File.Exists (filePath)) { File.Delete (filePath); } DateTime tryCountNow = DateTime.Now; client = new WebClient (); client.DownloadFileAsync (new Uri (mp3.Url), filePath); client.DownloadProgressChanged += client_DownloadProgressChanged; client.DownloadFileCompleted += client