title: Copy the entire contents of a directory in C#
body: <p>I want to copy the entire contents of a directory from one location to another in C#.</p>
  
  <p>There doesn't appear to be a way to do this using <code>System.IO</code> classes without lots of recursion.</p>
  
  <p>There is a method in VB that we can use if we add a reference to <code>Microsoft.VisualBasic</code>:</p>
  
  <pre><code>new Microsoft.VisualBasic.Devices.Computer().
      FileSystem.CopyDirectory( sourceFolder, outputFolder );
  </code></pre>
  
  <p>This seems like a rather ugly hack. Is there a better way?</p>