Application.CommonAppDataPath 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得所有使用者共享的應用程式資料路徑。
public:
static property System::String ^ CommonAppDataPath { System::String ^ get(); };
public static string CommonAppDataPath { get; }
static member CommonAppDataPath : string
Public Shared ReadOnly Property CommonAppDataPath As String
屬性值
應用程式資料的路徑,所有使用者之間共享。
備註
若不存在路徑,則以以下格式建立:
基地路徑\CompanyName\ProductName\ProductVersion
ProductVersion 首先查看包含主要執行檔的組合語言是否有該 AssemblyInformationalVersion 屬性。 若此屬性存在,則用於 ProductVersion 和 CommonAppDataPath。 若不存在此屬性,兩個屬性皆使用可執行檔版本。
路徑會因 Windows Forms 應用程式是否使用 ClickOnce 部署而有所不同。 ClickOnce 應用程式會儲存在 C:\Documents and Settings\username 目錄中的每位使用者應用程式快取中。 欲了解更多資訊,請參閱 ClickOnce 應用程式中的本地與遠端資料存取。