C# access settings values
I need to change the location of where a database file is located in a C#.net 2008 desktop application, but I am having problems. When stepping through the code, I find that I need to change a 'settings.settings' file. Bascially I need to be able to access the properties in some kind of a designer and I have not be able to do that. Would you have an idea of where I can obtain the directions to access the settings.settings file?

Javeed M ShaikhRank #839 · 2.7K reputationPosted Oct 26, 2011, 1:07 PM EDT
Javeed M ShaikhRank #839 · 2.7K reputationPosted Oct 26, 2011, 7:48 AM EDT
Properties.Settings.Default.yoursettingname;
scampercat187 reputationPosted Oct 26, 2011, 11:02 AM EDT
Javeed M ShaikhRank #839 · 2.7K reputationPosted Oct 26, 2011, 11:42 AM EDT
1. Right Click on the project, click properties.
2. Click on Settings tab on the left, this will open grid on the right hand side. Here you need to enter name of the setting, type, scope and Value.
3. you can later access this settings from C# code as show in my previous post.
Sam HobbsRank #107 · 20.5K reputationPosted Oct 26, 2011, 12:18 PM EDT
When you look at the project in the Solution Explorer, does it have a Settings.setting file in the Properties folder of the project? If so, then double-click that. Then refer to my instructions in the other thread. If there is not a Settings.setting file, then refer to the other thread for instructions. If there is something you do not understand, then please ask specific questions.
scampercat187 reputationPosted Oct 26, 2011, 1:00 PM EDT
scampercat187 reputationPosted Oct 26, 2011, 1:08 PM EDT
What do you mean by: "
I have posted instructions in the past about doing that, and I think I have already done that for one of your posts.".
What other thread are you referring to for "When you look at the project in the Solution Explorer, does it have a Settings.setting file in the Properties folder of the project? If so, then double-click that. Then refer to my instructions in the other thread."
Sam HobbsRank #107 · 20.5K reputationPosted Oct 26, 2011, 1:58 PM EDT
So you have found where the connection strings are. Note that the type is "(Connection string)". So to change it, first click in the "Value" column for the connection string row. You will see a small button with an ellipses ("...") in it at the right-side end of the cell; click that button (the ellipses).