System.Configuration

J

Joe Reiss

Using vs2005, C#

I'm writing some code to settings out of my app.config file. I seemed to be
missing many fields from System.Configuration. For example
System.Configuration.Configuration will not compile. Why am I missing so
many methods from this namespace?

Thanks,
Joe
 
M

Mythran

Joe Reiss said:
Using vs2005, C#

I'm writing some code to settings out of my app.config file. I seemed to
be missing many fields from System.Configuration. For example
System.Configuration.Configuration will not compile. Why am I missing so
many methods from this namespace?

Thanks,
Joe

Try System.Configuration.ConfigurationSettings.AppSettings for appSettings
element data retrieval :)

(this is the property of the ConfigurationSettings class in .Net 2003...I'm
unsure if it's changed in 2005.)


HTH,
Mythran
 
S

Steven Nagy

Hey,

If you look at MSDN help on the class you are missing, you can see what
assembly it belongs to. No doubt you are missing a reference to the
correct DLL.
I believe that some of the System.Configuration classes are actually
in:
System.Configuration.DLL
.... which is not always referenced in all project types. Check you have
that reference, and try your intellisense again.

Also, check out ConfigurationManager. Its funky. Lots of examples on
MSDN.
 
J

Joe Reiss

If I want to pull out from <connectionSrings> how do i do that? The above
just gives from <appSettings>.

Thanx,Joe
 
J

Joe Reiss

How do you pull out from <connectStrings> section? The above just does
<appSettings>.

thnx,
joe
 
S

Steven Nagy

Dude, I answered this, read my other post.

Joe said:
How do you pull out from <connectStrings> section? The above just does
<appSettings>.

thnx,
joe
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top