SyntaxFix
Write A Post
Hire A Developer
Questions
You should use:
dir.Delete(true);
for recursively deleting the contents of that folder too. See MSDN DirectoryInfo.Delete() overloads.