Mono Class Library: System.CodeDom.CodeCommentStatement Overview | Members

System.CodeDom.CodeCommentStatement Constructor

Creates a System.CodeDom.CodeCommentStatement with the CodeCommentStatement.Comment property initialized to the specified string. The docComment argument signifies whether the comment is a regular comment or a document line.

public CodeCommentStatement (string text, bool docComment)

Parameters

text
String the Comment property of this object is to be initialized to.
docComment
If true, specifies a documentation comment; otherwise a regular comment is produced.

Remarks

C# Example

demoNs.Comments.Add(new CodeCommentStatement("This is a docstring test",true));
demoNs.Comments.Add(new CodeCommentStatement("This is a test",false));
  
generates the following code for C#

C# Example

/// This is a docstring test
// This is a test
  

Requirements

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