Bagikan melalui


CodeCommentStatementCollection.Insert(Int32, CodeCommentStatement) Metode

Definisi

CodeCommentStatement Menyisipkan objek ke dalam koleksi pada indeks yang ditentukan.

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)

Parameter

index
Int32

Indeks berbasis nol tempat item harus disisipkan.

value
CodeCommentStatement

Objek CodeCommentStatement yang akan disisipkan.

Contoh

Contoh berikut menunjukkan cara menggunakan Insert metode untuk menambahkan CodeCommentStatement objek ke 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"))

Berlaku untuk

Lihat juga