Forest.FindGlobalCatalog Method (LocatorOptions)

 
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.

Finds a global catalog in this forest for a specified location criteria.

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

public GlobalCatalog FindGlobalCatalog(
	LocatorOptions flag
)

Parameters

flag
Type: System.DirectoryServices.ActiveDirectory.LocatorOptions

A LocatorOptions value specifying the location criteria.

Return Value

Type: System.DirectoryServices.ActiveDirectory.GlobalCatalog

A GlobalCatalog object for the specified location criteria.

Exception Condition
ActiveDirectoryObjectNotFoundException

A global catalog cannot be located.

ActiveDirectoryOperationException

A call to the underlying directory service resulted in an error.

ObjectDisposedException

The object has been disposed.

.NET Framework
Available since 2.0
Return to top
Show: