title: Recursive delete of files and directories in C#
body: <p>How to delete a given directory recursively in C# ?  A directory containing files.</p>
  <p>Should the <a href="https://docs.microsoft.com/en-us/dotnet/api/system.io.directory.delete" rel="nofollow noreferrer">System.IO.Directory.Delete</a> with the second parameter <code>true</code> do the trick?</p>
  <hr />
  <p>EDIT:</p>
  <p>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 <code>Delete</code> (2nd param set to <code>true</code>) 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 <code>RO</code> attribute set, and the <em>Polish</em> version of <code>Windows XP</code> was throwing a really strange message for that.</p>