DirectoryEntry.Parent Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets this entry's parent in the Active Directory Domain Services hierarchy.
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
Property Value
A DirectoryEntry object that represents the parent of this entry.
- Attributes
Examples
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);
Applies to
GitHub पर हमारे साथ सहयोग करें
इस सामग्री का स्रोत GitHub पर पाया जा सकता है, जहाँ आप समस्याएँ बना और समीक्षा भी कर सकते हैं और अनुरोध खींच सकते हैं. अधिक जानकारी के लिए, हमारे योगदानकर्ता गाइड देखें.