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 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?
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
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
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
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
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
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...
|
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..,...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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...
|
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...
|
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
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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...
|
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,...
|
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...
| |