PrincipalContext.ContextType Property

 
System_CAPS_noteNote

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

Gets the context type that specifies the type of store for the principal context.

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

public ContextType ContextType { get; }

Property Value

Type: System.DirectoryServices.AccountManagement.ContextType

A ContextType enumeration value specifying the type of target to connect to.

This property is used when the application does not directly create the principal context and specify the context type. For example, when the application enumerates group membership, this property can be used to determine the type of store to which the principal belongs.

.NET Framework
Available since 3.5

System.DirectoryServices.AccountManagement
PrincipalContext Class
System.DirectoryServices.AccountManagement Namespace Overview

Return to top
Show: