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

Индекс, отсчитываемый от нуля, по которому следует вставить указанный объект.

value
CodeParameterDeclarationExpression

Вставляемый объект CodeParameterDeclarationExpression.

Примеры

В следующем примере показано, как использовать Insert метод для добавления CodeParameterDeclarationExpression объекта в CodeParameterDeclarationExpressionCollection.

// Inserts a CodeParameterDeclarationExpression at index 0 
// of the collection.
collection->Insert( 0, gcnew CodeParameterDeclarationExpression( int::typeid,"testIntArgument" ) );
// 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"))

Применяется к

См. также раздел