개체 하위 트리 삭제
항목과 해당 항목의 자식을 모두 삭제하려면 DeleteTree 메서드를 호출합니다. DeleteTree 메서드를 호출하면 계층 구조에서 현재 항목 및 해당 하위 트리 항목이 모두 삭제됩니다.
다음 코드 조각에서는 디렉터리에서 개체 트리를 제거하는 방법을 보여 줍니다.
Dim entry As New DirectoryServices.DirectoryEntry( _
"LDAP://Fabrikam.com/cn=MyContainer,dc=Fabrikam,dc=com")
entry.DeleteTree()
System.DirectoryServices.DirectoryEntry entry =
new System.DirectoryServices.DirectoryEntry(
"LDAP://Fabrikam.com/cn=MyContainer,dc=Fabrikam,dc=com");
entry.DeleteTree();
참고 항목
참조
System.DirectoryServices
DirectoryEntry
개념
Send comments about this topic to Microsoft.
Copyright © 2007 by Microsoft Corporation. All rights reserved.