Share via


CompilerErrorCollection.Insert(Int32, CompilerError) メソッド

定義

コレクション内の指定したインデックス位置に、指定した CompilerError を挿入します。

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)

パラメーター

index
Int32

コンパイラ エラーを挿入する位置の 0 から始まるインデックス番号。

value
CompilerError

挿入する CompilerError

次の例では、 メソッドを使用 Insert して オブジェクトを CompilerError に挿入する方法を 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"))

適用対象

こちらもご覧ください