PrincipalContext.Container Property


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Gets the value specified in the container parameter in the constructor.

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

public string Container { get; }

Property Value

Type: System.String

The container on the store to use as the root of the context or null if the container is not specified.

All queries are performed under this root, and all inserts are performed into this container. For Domain and ApplicationDirectory context types, this property is the distinguished name of a container object. For Machine context types, this property must be null.

.NET Framework
Available since 3.5

PrincipalContext Class
System.DirectoryServices.AccountManagement Namespace Overview

Return to top