ParserErrorCollection.Insert(Int32, ParserError) 메서드

정의

지정된 ParserError 개체를 컬렉션의 지정된 인덱스에 삽입합니다.

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

매개 변수

index
Int32

컬렉션에서 ParserError를 삽입할 위치의 인덱스입니다.

value
ParserError

컬렉션에 삽입할 ParserError 개체입니다.

예제

다음 코드 예제에는 삽입 하는 방법을 보여 줍니다.는 ParserError 개체에서 지정 된 인덱스는 ParserErrorCollection 컬렉션입니다.

// Insert a ParserError at index 0 of the collection.
ParserError error = new ParserError("Error", "Path", 1);
collection.Insert(0, error);

// Remove the specified ParserError from the collection.
collection.Remove(error);
' Insert a ParserError at index 0 of the collection.
Dim [error] As New ParserError("Error", "Path", 1)
collection.Insert(0, [error])

' Remove the specified ParserError from the collection.
collection.Remove([error])

설명

사용 하 여 합니다 Insert 기존 삽입 하는 방법 ParserError 컬렉션 내의 특정 인덱스에는 개체입니다.

동일한 추가할 수 없습니다 ParserError 컬렉션에 개체를 두 번 이상. 호출 하는 경우는 Insert 메서드를 사용 하 여는 ParserError 이 이미 컬렉션에서 삽입이 실패 합니다. 사용 하 여는 Contains 특정 여부를 확인 하려면 삽입 하기 전에 메서드 ParserError 컬렉션에 이미 있습니다. 위치를 변경 하는 ParserError 컬렉션 내에서 먼저 제거 해야 사용 하 여는 Remove 메서드를 사용 하 여 원하는 인덱스에 삽입 하 고 Insert.

적용 대상