CodeCommentStatementCollection.Insert(Int32, CodeCommentStatement) Metoda

Definicja

CodeCommentStatement Wstawia obiekt do kolekcji w określonym indeksie.

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)

Parametry

index
Int32

Indeks oparty na zera, w którym element powinien zostać wstawiony.

value
CodeCommentStatement

CodeCommentStatement Obiekt do wstawienia.

Przykłady

W poniższym przykładzie pokazano, jak za pomocą Insert metody dodać CodeCommentStatement obiekt do obiektu 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"))

Dotyczy

Zobacz też