ParserErrorCollection.AddRange 메서드

정의

컬렉션에 ParserError 개체를 추가합니다.

오버로드

AddRange(ParserError[])

컬렉션에 ParserError 개체 배열을 추가합니다.

AddRange(ParserErrorCollection)

컬렉션에 기존 ParserErrorCollection의 개체를 추가합니다.

AddRange(ParserError[])

컬렉션에 ParserError 개체 배열을 추가합니다.

public:
 void AddRange(cli::array <System::Web::ParserError ^> ^ value);
public void AddRange (System.Web.ParserError[] value);
member this.AddRange : System.Web.ParserError[] -> unit
Public Sub AddRange (value As ParserError())

매개 변수

value
ParserError[]

컬렉션에 추가할 값을 나타내는 ParserError 형식의 배열입니다.

예외

value이(가) null인 경우

예제

다음 코드 예제에서는 범위를 추가 하는 방법을 보여 줍니다 ParserError 개체를 ParserErrorCollection 개체입니다.

// Add an array of ParserError objects to the collection.
ParserError[] errors = 
    { new ParserError("Error 2", "Path", 1), 
    new ParserError("Error 3", "Path", 1) };
collection.AddRange(errors);

// Add a collection of ParserError objects to the collection.
ParserErrorCollection errorsCollection = new ParserErrorCollection();
errorsCollection.Add(new ParserError("Error", "Path", 1));
errorsCollection.Add(new ParserError("Error", "Path", 1));
collection.AddRange(errorsCollection);
' Add an array of ParserError objects to the collection.
Dim errors As ParserError() = _
    {New ParserError("Error 2", "Path", 1), _
    New ParserError("Error 3", "Path", 1)}
collection.AddRange(errors)

' Ads a collection of ParserError objects to the collection.
Dim errorsCollection As New ParserErrorCollection()
errorsCollection.Add(New ParserError("Error", "Path", 1))
errorsCollection.Add(New ParserError("Error", "Path", 1))
collection.AddRange(errorsCollection)

설명

사용 합니다 AddRange 배열을 추가 하는 방법 ParserError 개체를 컬렉션에 있습니다. 합니다 AddRange 메서드는 여러 만들면 유용 ParserError 개체 및 단일 메서드 호출을 사용 하 여 컬렉션에 추가할 합니다. 개별 추가할 ParserError 개체를 컬렉션에 사용 된 Add 메서드.

적용 대상

AddRange(ParserErrorCollection)

컬렉션에 기존 ParserErrorCollection의 개체를 추가합니다.

public:
 void AddRange(System::Web::ParserErrorCollection ^ value);
public void AddRange (System.Web.ParserErrorCollection value);
member this.AddRange : System.Web.ParserErrorCollection -> unit
Public Sub AddRange (value As ParserErrorCollection)

매개 변수

value
ParserErrorCollection

컬렉션에 추가할 ParserErrorCollection 개체를 포함하는 ParserError입니다.

예외

ParserError 값이 null입니다.

예제

다음 코드 예제에서는 범위를 추가 하는 방법을 보여 줍니다 ParserError 개체를 ParserErrorCollection 개체입니다.

// Add an array of ParserError objects to the collection.
ParserError[] errors = 
    { new ParserError("Error 2", "Path", 1), 
    new ParserError("Error 3", "Path", 1) };
collection.AddRange(errors);

// Add a collection of ParserError objects to the collection.
ParserErrorCollection errorsCollection = new ParserErrorCollection();
errorsCollection.Add(new ParserError("Error", "Path", 1));
errorsCollection.Add(new ParserError("Error", "Path", 1));
collection.AddRange(errorsCollection);
' Add an array of ParserError objects to the collection.
Dim errors As ParserError() = _
    {New ParserError("Error 2", "Path", 1), _
    New ParserError("Error 3", "Path", 1)}
collection.AddRange(errors)

' Ads a collection of ParserError objects to the collection.
Dim errorsCollection As New ParserErrorCollection()
errorsCollection.Add(New ParserError("Error", "Path", 1))
errorsCollection.Add(New ParserError("Error", "Path", 1))
collection.AddRange(errorsCollection)

설명

달리는 Add 메서드를 AddRange 메서드 확인에 사용할 수 있는 반환 값이 없는 여부를 ParserError 추가할 개체가 이미 컬렉션에. 이 정보를 필요로 하는 경우 사용 합니다 Contains 메서드를 사용 하기 전에 AddRange입니다.

적용 대상