CustomErrorCollection.RemoveAt(Int32) 메서드

정의

컬렉션에서 지정된 인덱스 CustomError 위치에 있는 개체를 제거합니다.

public:
 void RemoveAt(int index);
public void RemoveAt(int index);
member this.RemoveAt : int -> unit
Public Sub RemoveAt (index As Integer)

매개 변수

index
Int32

제거할 개체의 CustomError 컬렉션 인덱스입니다.

예제

다음 코드 예제에서는 지정된 인덱스에서 개체를 CustomError 제거하는 방법을 보여 있습니다. 컬렉션을 가져오는 방법을 알아보려면 클래스 항목의 CustomErrorCollection 코드 예제를 참조하세요.

// Using method RemoveAt.
if (!customErrorsSection.SectionInformation.IsLocked)
{
    // Remove the error at 0 index
    customErrorsCollection.RemoveAt(0);
    configuration.Save();
}
' Using method RemoveAt.
If Not customErrorsSection.SectionInformation.IsLocked Then
   ' Remove the error at 0 index
   customErrorsCollection.RemoveAt(0)
   configuration.Save()
End If

설명

메서드는 RemoveAt 현재 계층 수준에서 구성 파일의 섹션에 요소를 remove 삽입 customErrors 합니다. 계층 구조의 상위 수준에서 부모 구성 파일에 정의된 요소에 대한 참조 add 를 제거하기 위한 것입니다.

참고add 요소는 부모 구성 파일에서 삭제되지 않습니다. 그들은 단지 비활성화됩니다. 그러나 메서드는 RemoveAt 실제로 현재 계층 수준에서 삭제합니다.

적용 대상