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( gcnew CodeCommentStatement( "Test comment" ) );
// Adds a CodeCommentStatement to the collection.
collection.Add( new CodeCommentStatement("Test comment") );
' Adds a CodeCommentStatement to the collection.
collection.Add(New CodeCommentStatement("Test comment"))

適用於

另請參閱