CodeParameterDeclarationExpressionCollection.Insert 方法

定義

將指定的 CodeParameterDeclarationExpression 資料插入到指定的索引中。

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

參數

index
Int32

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

範例

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

// Inserts a CodeParameterDeclarationExpression at index 0
// of the collection.
collection.Insert( 0, new CodeParameterDeclarationExpression(typeof(int), "testIntArgument") );
' Inserts a CodeParameterDeclarationExpression at index 0 
' of the collection.
collection.Insert(0, New CodeParameterDeclarationExpression(GetType(Integer), "testIntArgument"))

適用於

另請參閱