CodeStatementCollection.Insert(Int32, CodeStatement) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
将指定的 CodeStatement 对象插入集合中的指定索引处。
public:
void Insert(int index, System::CodeDom::CodeStatement ^ value);
public void Insert(int index, System.CodeDom.CodeStatement value);
member this.Insert : int * System.CodeDom.CodeStatement -> unit
Public Sub Insert (index As Integer, value As CodeStatement)
参数
- index
- Int32
应插入指定对象的从零开始的索引。
- value
- CodeStatement
要 CodeStatement 插入的对象。
示例
下面的示例演示如何使用 Insert 该方法将对象添加到 CodeStatement 对象 CodeStatementCollection。
// Inserts a CodeStatement at index 0 of the collection.
collection.Insert( 0, new CodeCommentStatement("Test comment statement") );
' Inserts a CodeStatement at index 0 of the collection.
collection.Insert(0, New CodeCommentStatement("Test comment statement"))