how to change default path for Properties.Settings

社会主义新天地 提交于 2019-12-06 07:01:29

问题


Whenever I do Properties.Settings.Save(), it commites the properties changes to Application.LocalUserAppDataPath but I want the path to be Application.CommonAppDataPath.

where

Application.CommonAppDataPath = 
C:\Documents and Settings\**All Users**\Application Data\xxxxx\xxxx\1.0.0.0


Application.LocalUserAppDataPath =
C:\Documents and Settings\**gsankar**\Local Settings\Application Data\xxxxx\xxxx\1.0.0.0

Please let me know whether it's possible to change. If so, please let me know how?


回答1:


use Properties.Settings.Default.ParentPath = Application.CommonAppDataPath; before calling Properties.Settings.Save();.



来源:https://stackoverflow.com/questions/214131/how-to-change-default-path-for-properties-settings

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!