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, gcnew CodeCatchClause( "e" ) );
// 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"))

適用於

另請參閱