Share via


FormsAuthenticationUserCollection.Remove(String) 메서드

정의

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

public:
 void Remove(System::String ^ name);
public void Remove (string name);
member this.Remove : string -> unit
Public Sub Remove (name As String)

매개 변수

name
String

컬렉션에서 제거할 FormsAuthenticationUser 개체의 이름입니다.

예외

지정된 키를 가진 FormsAuthenticationUser 개체가 컬렉션에 없거나, 요소가 이미 제거되었거나, 컬렉션이 읽기 전용인 경우

예제

다음 코드 예제에서는 Remove 메서드를 사용하는 방법을 보여 줍니다.

// Using method Remove.
// Execute the Remove method.
formsAuthenticationCredentials.Users.Remove("userName");

// Update if not locked
if (!authenticationSection.SectionInformation.IsLocked)
{
    configuration.Save();
}
' Using method Remove.
' Execute the Remove method.
formsAuthenticationCredentials.Users.Remove("userName")

' Update if not locked
If Not authenticationSection.SectionInformation.IsLocked Then
   configuration.Save()
End If

설명

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

적용 대상