Web应用程序: Request.MapPath(Request.ApplicationPath)
Winform应用程序: 以C:/Temp/Test.exe为例
Application.ExecutablePath
Application.StartupPath
程序结果如下:
C:/Temp/Test.exe
C:/Temp
Web应用程序: Request.MapPath(Request.ApplicationPath)
Winform应用程序: 以C:/Temp/Test.exe为例
Application.ExecutablePath
Application.StartupPath
程序结果如下:
C:/Temp/Test.exe
C:/Temp