ClientTargetCollection.Remove 메서드

정의

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

오버로드

Name Description
Remove(String)

컬렉션에서 ClientTarget 지정된 별칭이 있는 개체를 제거합니다.

Remove(ClientTarget)

컬렉션에서 지정된 ClientTarget 개체를 제거합니다.

Remove(String)

컬렉션에서 ClientTarget 지정된 별칭이 있는 개체를 제거합니다.

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

매개 변수

name
String

제거할 별칭 ClientTarget 입니다.

예제

다음 코드 예제에서는 컬렉션에서 개체를 제거 합니다 ClientTargetClientTargetCollection .

컬렉션을 가져오는 방법에 대한 자세한 내용은 클래스 개요의 코드 예제를 ClientTargetCollection 참조하세요.


// Remove the client target with the
// specified alias from the collection
// (if exists).
clientTargets.Remove("my alias");

// Update the configuration file.
if (!clientTargetSection.IsReadOnly())
  configuration.Save();
' Remove the client target with the
' specified alias from the collection
' (if exists).
clientTargets.Remove("my alias")

' Update the configuration file.
If Not clientTargetSection.IsReadOnly() Then
    configuration.Save()
End If

설명

메서드는 Remove 현재 계층 수준에서 섹션의 add 요소를 삭제 clientTarget 하고 요소를 삽입합니다remove. 요소는 remove 계층 구조의 상위 수준에서 부모 구성 파일에 정의된 요소에 대한 참조 add 를 효과적으로 제거하지만 삭제하지는 않습니다.

추가 정보

적용 대상

Remove(ClientTarget)

컬렉션에서 지정된 ClientTarget 개체를 제거합니다.

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

매개 변수

clientTarget
ClientTarget

제거할 항목입니다 ClientTarget .

예제

다음 코드 예제에서는 컬렉션에서 개체를 제거 합니다 ClientTargetClientTargetCollection .

컬렉션을 가져오는 방법에 대한 자세한 내용은 클래스 개요의 코드 예제를 ClientTargetCollection 참조하세요.


// Create a ClientTarget object.
clientTarget = new ClientTarget(
  "my alias", "My User Agent");

// Remove it from the collection
// (if exists).
clientTargets.Remove(clientTarget);

// Update the configuration file.
if (!clientTargetSection.IsReadOnly())
  configuration.Save();
' Create a ClientTarget object.
clientTarget = New ClientTarget( _
"my alias", "My User Agent")

' Remove it from the collection
' (if exists).
clientTargets.Remove(clientTarget)

' Update the configuration file.
If Not clientTargetSection.IsReadOnly() Then
    configuration.Save()
End If

설명

메서드는 Remove 현재 계층 수준에서 섹션의 add 요소를 삭제 clientTarget 하고 요소를 삽입합니다remove. 요소는 remove 계층 구조의 상위 수준에서 부모 구성 파일에 정의된 요소에 대한 참조 add 를 효과적으로 제거하지만 삭제하지는 않습니다.

추가 정보

적용 대상