System.CodeDom.CodeSnippetCompileUnit Class

Represents a literal code fragment that can be compiled.

See Also: CodeSnippetCompileUnit Members

Syntax

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

Remarks

System.CodeDom.CodeSnippetCompileUnit can represent a literal block of code that is included directly in the source without modification.

A System.CodeDom.CodeSnippetCompileUnit stores a section of code, exactly in its original format, as a string. The CodeDOM does not translate literal code fragments. Literal code fragments are stored and output in their original format. CodeDOM objects that contain literal code are provided so developers can encapsulate code that is already in the target language.

The CodeSnippetCompileUnit.Value property contains the literal code fragment as a string. The CodeSnippetCompileUnit.LinePragma property is optional and specifies the position of the code within a source code document.

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