AppContext.BaseDirectory 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得組合解析器用來探測組合語言的基礎目錄的檔案路徑。
public:
static property System::String ^ BaseDirectory { System::String ^ get(); };
public static string BaseDirectory { get; }
static member BaseDirectory : string
Public Shared ReadOnly Property BaseDirectory As String
屬性值
組合語言解析器用來探測組合語言的基礎目錄的檔案路徑。
備註
這是每個應用程式域的特性。 其值對 AppDomain.BaseDirectory 應於當前應用領域的屬性。
在 .NET 5 及以後版本中,對於捆綁組譯,回傳的值是主機執行檔的包含目錄。