System.CodeDom.CodeCompileUnit Class

Provides a container for a CodeDOM program graph.

See Also: CodeCompileUnit Members

Syntax

[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDispatch)]
[System.Runtime.InteropServices.ComVisible(true)]
public class CodeCompileUnit : CodeObject

Remarks

System.CodeDom.CodeCompileUnit provides a container for a CodeDOM program graph.

System.CodeDom.CodeCompileUnit contains a collection that can store System.CodeDom.CodeNamespace objects containing CodeDOM source code graphs, along with a collection of assemblies referenced by the project, and a collection of attributes for the project assembly.

A System.CodeDom.CodeCompileUnit can be passed to the System.CodeDom.Compiler.ICodeGenerator.GenerateCodeFromCompileUnit(CodeCompileUnit, System.IO.TextWriter, System.CodeDom.Compiler.CodeGeneratorOptions) method of an System.CodeDom.Compiler.ICodeGenerator implementation along with other parameters to generate code based on the program graph contained by the compile unit.

Note:

Some languages support only a single namespace that contains a single class in a compile unit.

Requirements

Namespace: System.CodeDom
Assembly: System (in System.dll)
Assembly Versions: 1.0.3300.0, 1.0.5000.0, 2.0.0.0, 4.0.0.0