Hi
When using 'ConfigurationSettings.AppSettings.Get' I get the below warning.
What is the problem and how can I fix it?
Thanks
Regards
= Warning Message ============================
Warning 9 'Public Shared ReadOnly Property AppSettings() As
System.Collections.Specialized.NameValueCollection ' is obsolete: 'This
method is obsolete, it has been replaced by
System.Configuration!System.Configuration.Configur ationManager.AppSettings' 5 2165
On May 11, 7:29 pm, "John" <J...@nospam.infovis.co.ukwrote:
Hi
When using 'ConfigurationSettings.AppSettings.Get' I get the below warning.
What is the problem and how can I fix it?
Thanks
Regards
= Warning Message ============================
Warning 9 'Public Shared ReadOnly Property AppSettings() As
System.Collections.Specialized.NameValueCollection ' is obsolete: 'This
method is obsolete, it has been replaced by
System.Configuration!System.Configuration.Configur ationManager.AppSettings'
They have changed (much improved) the configuration management api's
in .NET 2.0. This is telling you that you may want to switch to the
new api's. You do this by adding a reference to
System.Configuration.dll, and then you can access your appsettings
section via ConfigurationManager.AppSettings.
Also, you may want to check out the My namespace stuff in VB2005 - it
has a lot of support for settings.
--
Tom Shelton
Hi
There is no dll under System.Configuration. Also System.Configuration is
already imported. Using ConfigurationManager.AppSettings.Get(key) instead of
ConfigurationSettings.AppSettings.Get(key) gives the error
'ConfigurationManager' is not declared.
Thanks
Regards
"Tom Shelton" <to*********@comcast.netwrote in message
news:11**********************@n59g2000hsh.googlegr oups.com...
On May 11, 7:29 pm, "John" <J...@nospam.infovis.co.ukwrote:
>Hi
When using 'ConfigurationSettings.AppSettings.Get' I get the below warning. What is the problem and how can I fix it?
Thanks
Regards
= Warning Message ============================
Warning 9 'Public Shared ReadOnly Property AppSettings() As System.Collections.Specialized.NameValueCollectio n' is obsolete: 'This method is obsolete, it has been replaced by System.Configuration!System.Configuration.Configu rationManager.AppSettings'
They have changed (much improved) the configuration management api's
in .NET 2.0. This is telling you that you may want to switch to the
new api's. You do this by adding a reference to
System.Configuration.dll, and then you can access your appsettings
section via ConfigurationManager.AppSettings.
Also, you may want to check out the My namespace stuff in VB2005 - it
has a lot of support for settings.
--
Tom Shelton
John,
Try changing it to this:
System.Configuration.ConfigurationManager.AppSetti ngs
Ed
"John" wrote:
Hi
There is no dll under System.Configuration. Also System.Configuration is
already imported. Using ConfigurationManager.AppSettings.Get(key) instead of
ConfigurationSettings.AppSettings.Get(key) gives the error
'ConfigurationManager' is not declared.
Thanks
Regards
"Tom Shelton" <to*********@comcast.netwrote in message
news:11**********************@n59g2000hsh.googlegr oups.com...
On May 11, 7:29 pm, "John" <J...@nospam.infovis.co.ukwrote:
Hi
When using 'ConfigurationSettings.AppSettings.Get' I get the below
warning.
What is the problem and how can I fix it?
Thanks
Regards
= Warning Message ============================
Warning 9 'Public Shared ReadOnly Property AppSettings() As
System.Collections.Specialized.NameValueCollection ' is obsolete: 'This
method is obsolete, it has been replaced by
System.Configuration!System.Configuration.Configur ationManager.AppSettings'
They have changed (much improved) the configuration management api's
in .NET 2.0. This is telling you that you may want to switch to the
new api's. You do this by adding a reference to
System.Configuration.dll, and then you can access your appsettings
section via ConfigurationManager.AppSettings.
Also, you may want to check out the My namespace stuff in VB2005 - it
has a lot of support for settings.
--
Tom Shelton
Using System.Configuration.ConfigurationManager.AppSetti ngs.Get(key) gives
the error 'ConfigurationManager' is not a member of 'Configuration'.
Many Thanks
Regards
"EdB" <Ed*@discussions.microsoft.comwrote in message
news:0C**********************************@microsof t.com...
John,
Try changing it to this:
System.Configuration.ConfigurationManager.AppSetti ngs
Ed
"John" wrote:
>Hi
There is no dll under System.Configuration. Also System.Configuration is already imported. Using ConfigurationManager.AppSettings.Get(key) instead of ConfigurationSettings.AppSettings.Get(key) gives the error 'ConfigurationManager' is not declared.
Thanks
Regards
"Tom Shelton" <to*********@comcast.netwrote in message news:11**********************@n59g2000hsh.googleg roups.com...
On May 11, 7:29 pm, "John" <J...@nospam.infovis.co.ukwrote: Hi
When using 'ConfigurationSettings.AppSettings.Get' I get the below warning. What is the problem and how can I fix it?
Thanks
Regards
= Warning Message ============================
Warning 9 'Public Shared ReadOnly Property AppSettings() As System.Collections.Specialized.NameValueCollectio n' is obsolete: 'This method is obsolete, it has been replaced by System.Configuration!System.Configuration.Configu rationManager.AppSettings'
They have changed (much improved) the configuration management api's
in .NET 2.0. This is telling you that you may want to switch to the
new api's. You do this by adding a reference to
System.Configuration.dll, and then you can access your appsettings
section via ConfigurationManager.AppSettings.
Also, you may want to check out the My namespace stuff in VB2005 - it
has a lot of support for settings.
--
Tom Shelton
On May 11, 9:40 pm, "John" <J...@nospam.infovis.co.ukwrote:
Hi
There is no dll under System.Configuration. Also System.Configuration is
already imported. Using ConfigurationManager.AppSettings.Get(key) instead of
ConfigurationSettings.AppSettings.Get(key) gives the error
'ConfigurationManager' is not declared.
Thanks
Regards
"Tom Shelton" <tom_shel...@comcast.netwrote in message
news:11**********************@n59g2000hsh.googlegr oups.com...
On May 11, 7:29 pm, "John" <J...@nospam.infovis.co.ukwrote:
Hi
When using 'ConfigurationSettings.AppSettings.Get' I get the below
warning.
What is the problem and how can I fix it?
Thanks
Regards
= Warning Message ============================
Warning 9 'Public Shared ReadOnly Property AppSettings() As
System.Collections.Specialized.NameValueCollection ' is obsolete: 'This
method is obsolete, it has been replaced by
System.Configuration!System.Configuration.Configur ationManager.AppSettings'
They have changed (much improved) the configuration management api's
in .NET 2.0. This is telling you that you may want to switch to the
new api's. You do this by adding a reference to
System.Configuration.dll, and then you can access your appsettings
section via ConfigurationManager.AppSettings.
Also, you may want to check out the My namespace stuff in VB2005 - it
has a lot of support for settings.
--
Tom Shelton- Hide quoted text -
- Show quoted text -
System.Configuration.dll - go and add it to your project references.
System.Configuration.ConfigurationManager lives in that dll. VB2005 -
may very well add it automatically, because of the new my
functionality. I can assure you that in .net 2.0 there most certainly
is a system.configuration.dll - i work in C#, and it does not import
it by default.
--
Tom Shelton This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: bruce stockwell |
last post by:
Using 'self' in classes seems pretty straight forward. My curiosity is
why I have to use it. Shouldn't it be implied? If I create an instance
of 'human' called 'bruce' and call the method 'blink'...
|
by: Michael Riggio |
last post by:
Does anyone know why this property is obsolete? Also, is there an
alternative available?
|
by: jbeerni |
last post by:
In .NET, you can mark methods and accessors as obsolete by using the
directive.
I've found some interesting behavior with the directive when used in a class
which is referenced as a return type...
|
by: BrianProgrammer |
last post by:
I have this code below, that works like a champ, but two lines are
continually marked as obsolete. See embeded notes.
Private Shared Function TransformHTMLString(ByVal XSLT As String, _
ByVal...
|
by: Steve James |
last post by:
I am trying to mark an override method in a derived class as obsolete using
the ObsoleteAttribute. The compiler, however is not picking up this
attribute and is not generating a warning or an...
|
by: BrianProgrammer |
last post by:
I have this code below, that works like a champ, but two lines are
continually marked as obsolete. See embeded notes.
Private Shared Function TransformHTMLString(ByVal XSLT As String, _
ByVal...
|
by: Phill W. |
last post by:
If I have a reusbale (GAC-'registered') assembly that contains two,
related classes (imagine a DataSet and DataTable; the former
contains instances of the latter, the latter has a reference to its...
|
by: SenthilVel |
last post by:
Hi All
I am Trying to build my 1.1 framework code with 2.0 framework using Visual
Studio 2005 installed in my
machine.
when i tried doing doing so , i get errors like :
"
Error 1 Warning as...
|
by: John |
last post by:
Hi
I am getting obsolete function warnings on these two liens but can't figure
the correct syntax for the new equivalent functions;
ConfigurationSettings.AppSettings.Get(key)...
|
by: John |
last post by:
Hi
I am getting a 'function is obsolete' warning on the following two
statements;
ConfigurationSettings.AppSettings.Get(Key)
and
Dns.GetHostByName(strServer)
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
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: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
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...
| |