简体   繁体   中英

How to change the path of user.config winforms

There are settings I just want to change from the program, I don't want the file to be changed So I want to change the file path or try to hide it Is there a way?

Make them user scoped and then don't save the settings (or set them back to their defaults before you save the settings)

User Scoped settings are stored in a hidden file/folder under the user profile folder anyway. Only Application Scoped settings live in the YourAppName.config file alongside the EXE. Aplication Scoped settings cannot be changed at runtime

See also Why are application settings read-only in app.config?

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