Reputation: 139
I have a little problem. I did a program (WinForms C#) which copy files from disk to removable media.
This is my process in loop:
Structure of unzipped *.exe
My code:
foreach(string[] dir in listView1.SelectedItems)
{
if(Directory.Exists(Path.Combine(path_to_source, dir))
{
Directory.Delete(Path.Combine(path_to_source, dir), true);
}
}
The question is: Why program close and delete himself when Directory.Delete begin.
Upvotes: -1
Views: 82