AuthorizationRuleCollection.Remove(AuthorizationRule) 메서드

정의

컬렉션에서 AuthorizationRule 개체를 제거합니다.

public:
 void Remove(System::Web::Configuration::AuthorizationRule ^ rule);
public void Remove (System.Web.Configuration.AuthorizationRule rule);
member this.Remove : System.Web.Configuration.AuthorizationRule -> unit
Public Sub Remove (rule As AuthorizationRule)

매개 변수

rule
AuthorizationRule

제거할 AuthorizationRule 개체입니다.

예외

전달된 AuthorizationRule 개체가 컬렉션에 없거나, 요소가 이미 제거되었거나, 컬렉션이 읽기 전용인 경우

예제

다음 코드 예제에서는 Remove 메서드를 사용하는 방법을 보여 줍니다. 코드 예제에서는 참조는 AuthorizationSection 클래스 항목 컬렉션을 가져오는 방법을 알아봅니다.

// Remove the rule from the collection.
authorizationSection.Rules.Remove(authorizationRule);
' Remove the rule from the collection.
authorizationSection.Rules.Remove(authorizationRule)

설명

이 메서드는 삽입을 remove 상위 구성 파일에 정의 된 모든 요소에 대 한 구성 파일의 해당 섹션에는 요소입니다. 를 현재 구성 파일의 해당 섹션에서 요소를 정의 하는 경우 구성 파일에서 해당 항목이 제거 됩니다. 제거할 개체 컬렉션에 있어야 합니다.

적용 대상