System.CodeDom.CodeComment Class

Represents a comment.

See Also: CodeComment Members


public class CodeComment : CodeObject


System.CodeDom.CodeComment can be used to represent a single line comment.

A System.CodeDom.CodeCommentStatement can contain a System.CodeDom.CodeComment and allows it to be treated as a statement and generated as code within a collection of statements. Multi-line comments can be represented with multiple System.CodeDom.CodeCommentStatement objects.

To include a comment in a CodeDOM graph that can be generated to source code, add a System.CodeDom.CodeComment to a System.CodeDom.CodeCommentStatement, and add this to the statements collection of a System.CodeDom.CodeMemberMethod or to the comments collection of a System.CodeDom.CodeNamespace or any object that derives from System.CodeDom.CodeTypeMember.


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