Application.CommonAppDataPath 屬性

定義

取得所有使用者之間共用之應用程式資料的路徑。

public:
 static property System::String ^ CommonAppDataPath { System::String ^ get(); };
public static string CommonAppDataPath { get; }
member this.CommonAppDataPath : string
Public Shared ReadOnly Property CommonAppDataPath As String

屬性值

String

所有使用者之間共用之應用程式資料的路徑。

備註

如果路徑不存在,則會以下列格式建立路徑:

基底路徑\CompanyName\ProductName\ProductVersion

ProductVersion 會先查看包含主要可執行檔 AssemblyInformationalVersion 的元件是否有屬性。 如果這個屬性存在,則會用於 ProductVersionCommonAppDataPath 。 如果這個屬性不存在,這兩個屬性都會改用可執行檔的版本。

路徑會根據是否使用 ClickOnce 部署Windows Forms應用程式而有所不同。 ClickOnce應用程式會儲存在 C:\Documents 和 設定 \ username 目錄中的每個使用者應用程式快取中。 如需詳細資訊,請參閱存取 ClickOnce 應用程式中的本機和遠端資料

適用於

另請參閱