CodeCommentStatementCollection.Insert(Int32, CodeCommentStatement) Metoda

Definice

CodeCommentStatement Vloží objekt do kolekce v zadaném indexu.

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

Index založený na nule, do kterého má být položka vložena.

value
CodeCommentStatement

Objekt CodeCommentStatement , který chcete vložit.

Příklady

Následující příklad ukazuje, jak použít metodu Insert k přidání objektu CodeCommentStatement do objektu 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"))

Platí pro

Viz také