.net Framework Contains a mechanism called the Code Document Object Model (CodeDOM), which enables developers of programs that write source code to generate source code in multiple programming languages at run time, based on a single model that represents the rendered code.
system.codedom namespace defines types that represent the logical structure of the source code that is independent of the specific programming language. System.CodeDom.Compiler namespace defines the type of source code generated from the CodeDom graph, and the type of source code compilation that is managed in the supported languages. compiler vendors or developers can extend the collection of supported languages.
For example, if the CodeDom support for a language is available, some designers use the CodeDom as a language abstraction interface to generate source code in the correct programming language.
The. NET Framework contains code generators and code compilers for C #, JScript, and Visual Basic.
The content of this section
-
-
Using the CodeDOM
-
-
Describes general purpose and shows how to use CodeDOM to generate a simple object graph.
-
-
Generate the source code and compile the program in the CodeDOM diagram
-
-
Describes how to use the classes defined in the System.CodeDom.Compiler namespace to generate source code and compile the generated code using an external compiler.
-
-
How to: Create an XML document file using CodeDOM
-
-
Describes how to use CodeDOM to generate code that contains comments for XML documents, and how to compile the generated code before you can create an XML document output.
-
-
How to: Create a class using CodeDOM
-
-
Describes how to use CodeDOM to generate classes that contain fields, properties, methods, constructors, and entry points.
Reference
-
System.CodeDom
-
Defines an element that represents a code element in a programming language that targets the common language runtime.
-
System.CodeDom.Compiler
-
Defines an interface that generates and compiles code at run time.
Related chapters
-
CodeDOM Quick Reference
-
Provides a quick way for developers to find CodeDOM elements that represent source code elements.
Dynamic source code generation and compilation