简体   繁体   中英

get the installation directory in c#

I have xml file that after my application installation will located in the installation dir. i need the application to reed this file. how do i get the installation dir where the user install it in order to read this file. or is a better way to do it.

假定此代码所在的程序集安装在同一目录中:

Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM