CodeCommentStatementCollection.Insert(Int32, CodeCommentStatement) Metodo

Definizione

Inserisce un oggetto CodeCommentStatement nell'insieme, in corrispondenza dell'indice specificato.

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

Parametri

index
Int32

Indice in base zero in cui inserire l'elemento.

value
CodeCommentStatement

Oggetto CodeCommentStatement da inserire.

Esempio

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

// Inserts a CodeCommentStatement at index 0 of the collection.
collection->Insert( 0, gcnew CodeCommentStatement( "Test comment" ) );
// Inserts a CodeCommentStatement at index 0 of the collection.
collection.Insert( 0, new CodeCommentStatement("Test comment") );
' Inserts a CodeCommentStatement at index 0 of the collection.
collection.Insert(0, New CodeCommentStatement("Test comment"))

Si applica a

Vedi anche