Share via


CodeStatementCollection.Insert(Int32, CodeStatement) Metodo

Definizione

Inserisce l'oggetto CodeStatement specificato nella raccolta in corrispondenza dell'indice specificato.

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)

Parametri

index
Int32

Indice in base zero in corrispondenza del quale inserire l'oggetto specificato.

value
CodeStatement

Oggetto CodeStatement da inserire.

Esempio

Nell'esempio seguente viene illustrato come utilizzare il Insert metodo per aggiungere un CodeStatement oggetto a un oggetto CodeStatementCollection.

// Inserts a CodeStatement at index 0 of the collection.
collection->Insert( 0, gcnew CodeCommentStatement( "Test comment statement" ) );
// 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"))

Si applica a

Vedi anche