Forest.GetCurrentForest 方法

定義

取得目前使用者內容的 Forest 物件。

public:
 static System::DirectoryServices::ActiveDirectory::Forest ^ GetCurrentForest();
public static System.DirectoryServices.ActiveDirectory.Forest GetCurrentForest ();
static member GetCurrentForest : unit -> System.DirectoryServices.ActiveDirectory.Forest
Public Shared Function GetCurrentForest () As Forest

傳回

Forest

表示目前樹系的 Forest 物件。

例外狀況

呼叫基礎目錄服務時,發生錯誤。

適用於