Recursive delete of files and directories in C#
<p>how to delete a given dir recursively in C#? Should the System.IO.Directory.Delete with the second parameter true do the trick?</p>

<p>EDIT: I meant a directory containing files :D Sorry for the misunderstaning.</p>

<p>EDIT2: So, I actually did answer my own question, although the answers here were a little more clarifying. The reason for me asking this in the first place was that the code that has exactly that invocation of Delete (2nd param set to true) was not doing what it was supposed to be doing. As it turned out the cause of that was that there was a file somewhere down in the the directory hierarchy with RO attribute set, and the Polish version of Windows XP was throwing a really strange message for that. </p>
