AssemblyInfo.DirectoryPath 屬性

定義

取得應用程式存放的目錄。

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

屬性值

String A 包含應用程式儲存的目錄。

範例

本範例使用 屬性 My.Application.Info.DirectoryPath 來顯示應用程式儲存的目錄路徑。

MsgBox("Application directory path: " & My.Application.Info.DirectoryPath)

備註

My.Application.Info.DirectoryPath 屬性會取得應用程式存放的目錄。

依專案類型提供可用性

專案類型 Available
Windows 表單應用程式 Yes
類別庫 Yes
主控台應用程式 Yes
Windows 表單控制函式庫 Yes
Web 控制庫 No
Windows 服務 Yes
網站 No

適用於

另請參閱