cosmicX

I tried to save a value into the settings files, but it could not save the particular value even thought the event is called.
I tried the following way:

Properties.Settings.Default.Save();

but the file is not updated with the latest value but the default value.So, may I know how to solve on this issue.


Thank you.



Re: Visual C# General Cannot save value into Properties Settings

Ji Cheng Wang - MSFT

Hi cosmics,

For your issues to save the values of the property settings, my suggestions as follows:

1) Try to make sure the scope of the settings is not application but user instead. General settings cannot be saved.

2) Try to call Properties.Settings.Default.Upgrade() method before you call Properties.Settings.Default.Save(); and check if you can save the values of the property settings.

Besides, you can try to check out this article about "How to use the Settings class in C#" for reference - http://www.codeproject.com/useritems/PropertiesSettings.asp

Hope this helps,

Regards,

This response contains links reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you.
Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there.
There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.






Re: Visual C# General Cannot save value into Properties Settings

paoloTheCool

Just a thought...if you are running the debug it does not have the same settings file as the non-debug.

Thanks,

paoloTheCool