471,319 Members | 1,211 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,319 software developers and data experts.

Getting to the ApplicationSettingsBase Class

Does anyone know how to access the Settings property information? VS2k5
created this, all documentation basically only points to VB.NET. When you
try it in C#, nothing is accessible. Any thoughts - has anyone been
successful in accessing this information via code? If so, can you show me
an example?

dh
Nov 29 '05 #1
5 3874
"Doug Handler" <dk*******@yahoo.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Does anyone know how to access the Settings property information? VS2k5
created this, all documentation basically only points to VB.NET. When you
try it in C#, nothing is accessible. Any thoughts - has anyone been
successful in accessing this information via code? If so, can you show me
an example?


Are you refering to the class VS generates when you add Settings in the
project properties?

If so, the Settings class it generates is in a Properties namespace. eg, if
I create a setting called "TestBool" of type bool, I get intelliense in my
forms to type:

Properties.Settings.Default.TestBool = true;
Properties.Settings.Default.Save();

Does that help?
Nov 29 '05 #2
Additionaly, if the settings are shared across multiple prj, simply LINK the
Settings.Designer.cs of the hosting settings to the client will do.

regards
Nov 30 '05 #3
I was wondering the same thing! After specifiying a setting in the Project
Designer, Settings Tab, how do you access that setting using C# code?

Dennis
"Doug Handler" <dk*******@yahoo.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Does anyone know how to access the Settings property information? VS2k5
created this, all documentation basically only points to VB.NET. When you
try it in C#, nothing is accessible. Any thoughts - has anyone been
successful in accessing this information via code? If so, can you show me
an example?

dh

Dec 3 '05 #4
Well, I don't know why MS didn't include documentation for this where
Project Designer, Settings are described, but you can access your project's
settigns with the Settings class. You can also work with settings events by
clicking the View Code button at the top of the Settings page.

Dennis
"Dennis C. Drumm" <dc******@community.nospam> wrote in message
news:Ot******************@TK2MSFTNGP09.phx.gbl...
I was wondering the same thing! After specifiying a setting in the Project
Designer, Settings Tab, how do you access that setting using C# code?

Dennis
"Doug Handler" <dk*******@yahoo.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Does anyone know how to access the Settings property information? VS2k5
created this, all documentation basically only points to VB.NET. When
you try it in C#, nothing is accessible. Any thoughts - has anyone been
successful in accessing this information via code? If so, can you show
me an example?

dh


Dec 3 '05 #5
This is still not helpful. The only information I found in the documentation
is about creating a wrapper class the the AppSettingsBase class, which seems
like overkill if all you want to do is retrieve the settings in the user
scope. It does seem that the VB.NET documentation covers this functionality
when explaining the My.Settings class; just can't seems to find the
equivalent in the c# documentation. grrr.

"Dennis C. Drumm" wrote:
Well, I don't know why MS didn't include documentation for this where
Project Designer, Settings are described, but you can access your project's
settigns with the Settings class. You can also work with settings events by
clicking the View Code button at the top of the Settings page.

Dennis
"Dennis C. Drumm" <dc******@community.nospam> wrote in message
news:Ot******************@TK2MSFTNGP09.phx.gbl...
I was wondering the same thing! After specifiying a setting in the Project
Designer, Settings Tab, how do you access that setting using C# code?

Dennis
"Doug Handler" <dk*******@yahoo.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Does anyone know how to access the Settings property information? VS2k5
created this, all documentation basically only points to VB.NET. When
you try it in C#, nothing is accessible. Any thoughts - has anyone been
successful in accessing this information via code? If so, can you show
me an example?

dh



Jan 13 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

12 posts views Thread by Sunny | last post: by
reply views Thread by Wilfried Mestdagh | last post: by
33 posts views Thread by JamesB | last post: by
3 posts views Thread by =?Utf-8?B?ZmJvbGVmZXlzb3Q=?= | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.