settings.settings values don't load?

B

Brett Romero

I've created a new settings file named AppList.settings for a Winform
app. In the Program.cs file, I can access values in settings.settings
fine. However, when I do this:

SettingsPropertyValueCollection propertyColl =
MyNameSpace.Properties.AppList.Default.PropertyValues;

No values come back; the collection is empty. There are three entries
in the file. However, if I set a breakpoint anywhere in the Program.cs
file, I get values from the AppList file. The breakpoint can be after
the above assignment and I still get values. The Settings.settings
file works fine regardless.

Any ideas why that is?

Thanks,
Brett
 
B

Brett Romero

If I do this before trying to use the values, it works everytime:

bool test = AppList.IDConversion;

It acts sort of like a primer. Still not sure what is going on.

Brett
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top