CodeCommentStatementCollection.Add(CodeCommentStatement) 方法

定義

將指定的 CodeCommentStatement 物件加入集合中。

public:
 int Add(System::CodeDom::CodeCommentStatement ^ value);
public int Add(System.CodeDom.CodeCommentStatement value);
member this.Add : System.CodeDom.CodeCommentStatement -> int
Public Function Add (value As CodeCommentStatement) As Integer

參數

value
CodeCommentStatement

CodeCommentStatement要補充的目標。

傳回

新元素插入的索引。

範例

以下範例示範如何將物件加入CodeCommentStatementCodeCommentStatementCollection實例。

// Adds a CodeCommentStatement to the collection.
collection.Add( new CodeCommentStatement("Test comment") );
' Adds a CodeCommentStatement to the collection.
collection.Add(New CodeCommentStatement("Test comment"))

適用於

另請參閱