Forest.GetCurrentForest Method ()

 

Gets a Forest object for the current user context.

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

public static Forest GetCurrentForest()

Return Value

Type: System.DirectoryServices.ActiveDirectory.Forest

A Forest object that represents the current forest.

Exception Condition
ActiveDirectoryOperationException

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

.NET Framework
Available since 2.0
Return to top
Show: