save properties setting at runtime
Posted on 2009-07-09
Having trouble saving setting value. I created a Settings.settings file in my C# project and would like to save a variable to that file. I looked at the example at MSDN:
To Write and Persist User Settings at Run Time
Access the user setting and assign it a new value, as shown in the following example:
Properties.Settings.Default.myColor = Color.AliceBlue;
Properties.Settings.Default.apiCallsCalled = 1000;
I get an error saying '=' is an invalid token in class, struct, interface or member declaration. Can someone tell me what's wrong?