开发者

How do I "Change the Value of a Setting Between Application Sessions" in a C# application?

The MSDN web page makes it sound easy to change application settings by hand. I can't find the file though. I can find the file in my development path, but I have no idea if that is the path the application is actually running in. I set a DB connection setting in "settings.settings" and now I want to change it on my machine. I understand that for my Foo.exe there is a Foo.exe.config, but I can't find 开发者_运维百科it.

Where is it? How do I find it?


Refer to the section "Settings File Locations" in the following article: http://msdn.microsoft.com/en-us/library/8eyb2ct1.aspx

The application-level settings and default user-level settings will be stored in yourProgram.exe.config in the same directory as the executable. The user-level settings are stored in user.config in a location which differs according to the deployment method.

The path you mention in C:\Documents and Settings\laqlu\Local Settings\Apps\... is not a cached file, it is the actual user-level settings file. Changing its content will affect your program.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜