title: SQL Server SMO: drop multiple objects with dependencies
body: <p>Given a set of objects (tables, views, procs, ...) I want to <strong>drop all of them and all objects that depend on them</strong>.</p>
  
  <p>This requires executing the drop operations in <strong>dependency order</strong> for both the objects that I want to drop as well as all dependent objects.</p>
  
  <p>How can this be done with <strong>SQL Server Management Objects (SMO)</strong> for .NET in a <strong>clean and elegant way?</strong></p>
  
  <p>(Background for question: The set of objects to drop is programatically generated and not predictable. I'm building an internal tool.).</p>