What is the purpose of CodeDom in .NET?
you will be writing source code for your program. What if you have to
implement the same functionality in many other .NET languages? Then you
will manually create source code in each of the language, implementing
the same functionality. Instead, what if you get an option to generate
the source code automatically? Such provision is provided by CodeDOM.
CodeDOM stands for Code Document Object Model. It generates source code
Advantages of CodeDOM:
Reduce the need for human developers to generate the code
Avoid coding tasks to be done in repetitive way
Developers can use the namespaces available for CodeDOM and they can generate their own utilities to generate code. The namespace corresponding to CodeDom is System.CodeDOM
CodeDOM creates code in dynamic way and performs compilation and execution at run times. Finally it delivers the executable in the bin directory
Using CodeDOM you create a source code in memory and this source code is language independent