CompilerErrorCollection.Add(CompilerError) 메서드

정의

지정된 CompilerError 개체를 오류 컬렉션에 추가합니다.

public:
 int Add(System::CodeDom::Compiler::CompilerError ^ value);
public int Add (System.CodeDom.Compiler.CompilerError value);
member this.Add : System.CodeDom.Compiler.CompilerError -> int
Public Function Add (value As CompilerError) As Integer

매개 변수

value
CompilerError

추가할 CompilerError 개체입니다.

반환

새 요소가 삽입된 인덱스입니다.

예제

다음 예제에서는 사용 Add 하는 방법에 설명 합니다 에 개체를 CompilerError 추가 하는 CompilerErrorCollection방법입니다.

// Adds a CompilerError to the collection.
collection->Add( gcnew CompilerError( "Testfile::cs",5,10,"CS0001","Example error text" ) );
// Adds a CompilerError to the collection.
collection.Add( new CompilerError("Testfile.cs", 5, 10, "CS0001", "Example error text") );
' Adds a CompilerError to the collection.
collection.Add(New CompilerError("Testfile.cs", 5, 10, "CS0001", "Example error text"))

적용 대상

추가 정보