App Config

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I would like to add a different section to the app.config file like the
following
<configuration>
<connections>
<add key="con1" value="blahblahblah" />
</connections>

In the ConfigurationSettings.AppSettings.Get(), what would the string be in
order to get to con1?

Thanks,
JJ
 
Hi,

You can use ConfigurationSettings.GetSection

A warning though.
I tried to use it once, and at the end I found easier to just use the
AppSettings , you see the framework does provide readily access to
AppSettings, I don't remember details now but I found more difficult to work
with a custom section.


cheers,
 
Back
Top