VCCodeIDLCoClass.Comment 屬性


取得或設定與此程式碼項目關聯的註解。Gets or sets the comment associated with the code element.

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



與此程式碼項目關聯的註解。The comment associated with the code element.



Comment 設定或傳回標頭批註。Comment sets or returns the header comment. 傳回時,文字不會包含任何批註語法。When returned, the text does not contain any comment syntax. 註解文字衍生自包含程式碼元素的來源文件。The comment text is derived from the source document that contains the code element. 所收集的標頭批註行數會根據批註撰寫的語言而有所不同。The number of header comment lines collected varies depending on the language in which the comments are written.

設定時, Comment 會嘗試使用行導向的或分隔的語法來維護任何現有批註的樣式,方法是藉由維護批註是否觸及程式碼專案,或是以空白行分隔,來維持任何現有批註的樣式。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.