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, 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"))

適用対象

こちらもご覧ください