WebApplicationInformation.ApplicationPath 屬性

定義

取得應用程式實體路徑。

C#
public string ApplicationPath { get; }

屬性值

應用程式實體路徑。

範例

下列程式碼範例示範如何取得應用程式實體路徑。

C#
public string GetApplicationPath()
{
    // Get the name of the application  path.
    return (string.Format(
        "Application path: {0}",
        ApplicationInformation.ApplicationPath));
}

備註

此屬性需要存取適當的許可權。 請參閱許可權一節。

適用於

產品 版本
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1