CodeCatchClauseCollection.Insert(Int32, CodeCatchClause) 方法

定義

將指定的 CodeCatchClause 物件插入集合中指定的索引。

public:
 void Insert(int index, System::CodeDom::CodeCatchClause ^ value);
public void Insert(int index, System.CodeDom.CodeCatchClause value);
member this.Insert : int * System.CodeDom.CodeCatchClause -> unit
Public Sub Insert (index As Integer, value As CodeCatchClause)

參數

index
Int32

以零為基礎的索引,應該插入指定的物件。

value
CodeCatchClause

CodeCatchClause要插入的物件。

範例

以下範例示範如何使用此 Insert 方法將物件加入 CodeCatchClauseCodeCatchClauseCollection

// Inserts a CodeCatchClause at index 0 of the collection.
collection.Insert( 0, new CodeCatchClause("e") );
' Inserts a CodeCatchClause at index 0 of the collection.
collection.Insert(0, New CodeCatchClause("e"))

適用於

另請參閱