Hey
Why can't I delete files after downloading file
I get error:
file 'exfile.jpgg' because it is being used by another process.
Edit: (Here is more code)
string file_name = "pic.jpg"
WebClient client = new WebClient();
client.DownloadFile("http://picture.com/pic.jpg", file_name);
client.Dispose();
client = null;
pictureBox1.Image = Image.FromFile(File_Name);
pictureBox1.Image = null;
FileInfo MyFile = new FileInfo(File_Name);
MyFile.Delete();