ParserErrorCollection.AddRange 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
컬렉션에 개체를 추가합니다 ParserError .
오버로드
| Name | Description |
|---|---|
| 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.