Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有 xml 文件,在我的应用程序安装后将位于安装目录中。我需要应用程序来读取这个文件。我如何获取用户安装它的安装目录以读取此文件。或者是更好的方法。
假设此代码所在的程序集安装到同一目录:
Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)