title: Reflection.Emit vs CodeDOM
body: <p><strong>What are some pros/cons for using the Reflection.Emit library versus CodeDOM for dynamically generating code at runtime?</strong></p>
  
  <p>I am trying to generate some (relatively complicated) dynamic classes in a system based on metadata available at runtime in XML form. I will be generating classes that extend existing classes in the application assembly, implementing additional interfaces, adding methods, and overriding virtual and abstract members.</p>
  
  <p>I want to make sure I select the appropriate technique before I get too deep into the implementation. Any information about how these different code-generation techniques differ would be helpful. Also, any information on open-source libraries that simplify or streamline working wither either API would be useful as well.</p>