CodeVariable.Comment 属性

定义

获取或设置与代码元素关联的注释。

public:
 property System::String ^ Comment { System::String ^ get(); void set(System::String ^ value); };
public:
 property Platform::String ^ Comment { Platform::String ^ get(); void set(Platform::String ^ value); };
[System.Runtime.InteropServices.DispId(40)]
public string Comment { [System.Runtime.InteropServices.DispId(40)] [System.Runtime.InteropServices.TypeLibFunc(1024)] get; [System.Runtime.InteropServices.DispId(40)] [System.Runtime.InteropServices.TypeLibFunc(1024)] set; }
[<System.Runtime.InteropServices.DispId(40)>]
[<get: System.Runtime.InteropServices.DispId(40)>]
[<get: System.Runtime.InteropServices.TypeLibFunc(1024)>]
[<set: System.Runtime.InteropServices.DispId(40)>]
[<set: System.Runtime.InteropServices.TypeLibFunc(1024)>]
member this.Comment : string with get, set
Public Property Comment As String

属性值

String

一个表示与代码元素关联的注释的字符串。

属性

注解

Comment 设置或返回标题注释。 返回时,文本不包含注释语法。

注释文本派生自包含代码元素的源文档。 收集的标头注释行数将因写入注释的语言而异。

如果设置此设置,则 Comment 会通过在面向行的语法间维护任何缩进来尝试使用面向行的语法和分隔语法来维护现有注释的样式,方法是确定注释是涉及代码元素还是用空行分隔。

备注

在进行了某些类型的编辑之后,代码模型元素(例如类、结构、函数、特性、委托等)的值可能变为非确定性的,这意味着不能确定它们的值始终保持不变。 有关详细信息,请参阅 "代码模型元素值在 使用代码模型查找代码时 可能发生变化" (Visual Basic) "。

适用于