This documentation is archived and is not being maintained.

Comment Property (General Extensibility)

Visual Studio .NET 2003

Sets or returns the comment associated with the code element.

[Visual Basic .NET]
Public Property Comment() As String
[Visual Basic 6]
Property Get Comment() As String
Property Let Comment( _
   ByVal NewValue As String _
HRESULT __stdcall get_Comment(
   /* [out, retval] */ BSTR* retVal
HRESULT __stdcall put_Comment(
   /* [in] */ BSTR NewValue
string Comment {get; set;}
[JScript .NET]
public function get Comment() : String
public function set Comment(
   NewValue : String


The comment text.


Comment sets or returns the header comment. When returned, the text does not contain any comment syntax. The text is derived from the source based on the language's comment style in terms of how far back through the sources to collect comments as being the header comment for a code element.

When set, Comment attempts to maintain the style of any existing comment by using line-oriented versus delimited syntax, by maintaining any indentation prior to line-oriented syntax, by maintaining whether the comment touches the code element or is separated by a blank line, and so forth.

Note   This property is read-only for code elements from Visual Basic .NET source code.

See Also

Applies To: CodeClass Object | CodeDelegate Object | CodeEnum Object | CodeFunction Object | CodeInterface Object | CodeNamespace Object | CodeProperty Object | CodeStruct Object | CodeType Object | CodeVariable Object | VCCodeBase Object | VCCodeClass Object | VCCodeDelegate Object | VCCodeElement Object | VCCodeEnum Object | VCCodeEvent Object | VCCodeFunction Object | VCCodeIDLCoClass Object | VCCodeIDLImport Object | VCCodeIDLImportLib Object | VCCodeIDLLibrary Object | VCCodeImport Object | VCCodeInclude Object | VCCodeInterface Object | VCCodeMacro Object | VCCodeMap Object | VCCodeMapEntry Object | VCCodeNamespace Object | VCCodeProperty Object | VCCodeStruct Object | VCCodeTypedef Object | VCCodeUnion Object | VCCodeVariable Object | VCCodeUsing Object