Bagikan melalui


CompilerErrorCollection.Insert(Int32, CompilerError) Metode

Definisi

Menyisipkan yang ditentukan CompilerError ke dalam koleksi pada indeks yang ditentukan.

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

Parameter

index
Int32

Indeks berbasis nol tempat kesalahan pengkompilasi harus disisipkan.

value
CompilerError

yang akan disisipkan CompilerError .

Contoh

Contoh berikut menunjukkan cara menggunakan Insert metode untuk menyisipkan CompilerError objek ke dalam CompilerErrorCollection.

// Inserts a CompilerError at index 0 of the collection.
collection->Insert( 0, gcnew CompilerError( "Testfile.cs",5,10,"CS0001","Example error text" ) );
// Inserts a CompilerError at index 0 of the collection.
collection.Insert( 0, new CompilerError("Testfile.cs", 5, 10, "CS0001", "Example error text") );
' Inserts a CompilerError at index 0 of the collection.
collection.Insert(0, New CompilerError("Testfile.cs", 5, 10, "CS0001", "Example error text"))

Berlaku untuk

Lihat juga