473,385 Members | 1,834 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 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 3966
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Eyal | last post by:
Hey, I would appriciate if anyone can help on this one: I have a java object/inteface having a method with a boolean parameter. As I'm trying to call this method from a javascript it fails on...
12
by: Sunny | last post by:
Hi All, I have a serious issue regarding classes scope and visibility. In my application, i have a class name "TextFile", and also a few other classes like "TotalWords", "TotalLines" and etc..,...
0
by: Wilfried Mestdagh | last post by:
Hi, I try to do something with ApplicationSettingsBase but after save I cannot find a config file, and it does not load eather. Probably I forget somethign but what ? Can someone check this ? I...
0
by: tomislav.bartolin | last post by:
Hi, I have inherited TaskSettings class from the ApplicationSettingsBase class and are able to get the configuration settings for this class quite nicely in my windows app. Now, if I inherit...
5
by: Mountain | last post by:
I'm working with the example code found at http://msdn2.microsoft.com/en-us/library/system.configuration.applicationsettingsbase(VS.80).aspx. I would like to implement application settings based...
1
by: simbarashe | last post by:
Hie could someone please help me with getting and using the current page url. I have a function that gets the url, I want to use it with header(location : XXX) but it wont work. The code is as...
33
by: JamesB | last post by:
I am writing a service that monitors when a particular app is started. Works, but I need to get the user who is currently logged in, and of course Environment.UserName returns the service logon...
1
by: gilbert | last post by:
Hello. I am trying to work with the Settings in .NET 2.0. I have a few settings in the VS2005 generated ApplicationSettingsBase class (Properties.Settings.settings). These settings are marked...
3
by: =?Utf-8?B?ZmJvbGVmZXlzb3Q=?= | last post by:
I have a 'Filter' class that contains some strings, 1 bool and 2 Color attributes. I made an array of Filter : Filter, and I'd like to save this array with the application settings system. here...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.