Application Settings in VS2005... Anyone get this to work or knowa good site with an up--to-date tut

J

Jim

I'm trying to use the Application Settings option in VS2005 with C#. So
far I've no success getting my settings to save or load. Various
tutorials on the 'net seem to be outdated.

Even MSDN's info seems to be incorrect regarding the act of accessing
saved settings. They say a "Settings" object is used to access them but
I have no access to such an object (It's called My.Settings in vb).

Anyone know the low-down on this? Any helpful tutorials?

Thanks for any help.
 
T

ThreeNF

I did something like this, but for user settings (not application since
they should be read only).

private void SaveSettings()
{
<ProjectName>.Properties.Settings userSettings = new
<ProjectName>.Properties.Settings();

userSettings.<NameOfSetting> = "This really blows my mind!!";

userSettings.Save();
}

When reading the setting, do the same as above, but read :) I found
that a user.config file gets stored in C:\Documents and
Settings\<userName>\Local settings\Application Data\Company Name (from
assembly info?)\<Project Name>_Weird looking key

Hope this helps. I'm very new to this :)
 

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