ParserErrorCollection.Insert(Int32, ParserError) 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
지정된 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.