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"))

适用于

另请参阅