Sdílet prostřednictvím


DirectoryEntry.Parent Vlastnost

Definice

Získá nadřazenou položku v hierarchii Active Directory Domain Services.

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

Hodnota vlastnosti

Objekt DirectoryEntry , který představuje nadřazený objekt této položky.

Atributy

Příklady

Následující příklad vyhledá danou a DirectoryEntry zobrazí Name a Parent výsledek.

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);  

Platí pro