DirectoryEntry.Parent DirectoryEntry.Parent DirectoryEntry.Parent DirectoryEntry.Parent Property

Definición

Obtiene la entrada principal de esta entrada en la jerarquía de Servicios de dominio de Active Directory.Gets this entry's parent in the Active Directory Domain Services hierarchy.

public:
 property System::DirectoryServices::DirectoryEntry ^ Parent { System::DirectoryServices::DirectoryEntry ^ get(); };
[System.ComponentModel.Browsable(false)]
[System.DirectoryServices.DSDescription("DSParent")]
public System.DirectoryServices.DirectoryEntry Parent { get; }
member this.Parent : System.DirectoryServices.DirectoryEntry
Public ReadOnly Property Parent As DirectoryEntry

Valor de propiedad

Objeto DirectoryEntry que representa el elemento primario de esta entrada.A DirectoryEntry object that represents the parent of this entry.

Ejemplos

El siguiente ejemplo busca un determinado DirectoryEntry y muestra el Name y Parent del resultado.The following example searches a given DirectoryEntry and displays the Name and Parent of the result.

Dim myADSPath As String = _   
          "LDAP://onecity/CN=user,CN=Users,DC=onecity,DC=corp,DC=fabrikam,DC=com"  
Dim myDirectoryEntry As New DirectoryEntry(myADSPath, UserName, SecurelyStoredPassword)  

Console.WriteLine("Parent is :" + myDirectoryEntry.Parent.Path)  
String myADSPath = "LDAP://onecity/CN=user,CN=Users,DC=onecity,DC=corp,DC=fabrikam,DC=com";  
DirectoryEntry myDirectoryEntry=new DirectoryEntry(myADSPath, UserName, SecurelyStoredPassword);  

Console.WriteLine("Parent is :"+myDirectoryEntry.Parent.Path);  
String^ myADSPath = "LDAP://onecity/CN=user,CN=Users,DC=onecity,DC=corp,DC=fabrikam,DC=com";  
DirectoryEntry^ myDirectoryEntry = gcnew DirectoryEntry(myADSPath, UserName, SecurelyStoredPassword);  

Console::WriteLine("Parent is :{0}", myDirectoryEntry->Parent->Path);  

Seguridad

DirectoryServicesPermission
Para obtener al elemento primario.To get the parent.

Se aplica a