Link to home
Start Free TrialLog in
Avatar of acclimate
acclimate

asked on

save properties setting at runtime

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;

My code:
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?

Thanks,
ASKER CERTIFIED SOLUTION
Avatar of stormist
stormist

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial