This documentation is archived and is not being maintained.

DirectoryEntry.Children Property

Gets the child entries of this node in the Active Directory Domain Services hierarchy.

Namespace:  System.DirectoryServices
Assembly:  System.DirectoryServices (in System.DirectoryServices.dll)

public DirectoryEntries Children { get; }

Property Value

Type: System.DirectoryServices.DirectoryEntries
A DirectoryEntries object containing the child entries of this node in the Active Directory Domain Services hierarchy.

The child entries are only the immediate children of this node.

Use this property to find, retrieve, or create a directory entry in the hierarchy. This property is a collection that, along with the usual iteration capabilities, provides an Add method through which you add a node to the collection directly below the parent node that you are currently bound to. When adding a node to the collection, you must specify a name for the new node and the name of a schema template that you want to associate with the node. For example, you might want to use a schema titled "Computer" to add new computers to the hierarchy.


By default, changes are made locally to a cache. After you modify or add a node, you must call the CommitChanges method to commit your changes in order for them to be saved to the tree. If you call RefreshCache() before calling CommitChanges, any uncommitted changes to the property cache will be lost. For more information, see the CommitChanges and RefreshCache() methods, and the UsePropertyCache property.

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0, 1.1, 1.0