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.
我已经在谷歌上研究过这个问题,我似乎无法给出一个好的答案,或者我只是在搜索错误的东西
我知道默认情况下任何项目设置都存储在 User/AppData 目录中 无论如何要从程序运行的同一目录中读取这些设置?
如果您希望从应用程序目录中读取配置设置,您应该使用应用程序配置文件。这是myprogram.exe.config文件。但请注意,这些并非特定于用户。如果用户没有权限写入应用程序目录中的文件,您可能会遇到问题。
myprogram.exe.config