Home All Groups Group Topic Archive Search About

Saving settings to custom configuration section in 2.0

Author
1 Feb 2006 8:05 PM
Dilbert
Hi, I am looking for a way to save settings to a custom section in app.config
from a C# application.  I am using .NET 2.0.

The following is a snippet of the app.config

<configuration>
   <configSections>
      <sectionGroup name="GroupA">
           <section name="Section1"
type="System.Configuration.NameValueSectionHandler"/>
      </sectionGroup>
   </configSections>
   <GroupA>
      <Section1>
            <add key="item1" value="value1"/>
            <add key="item2" value="value2"/>
      </Section1>
   </GroupA>
</configuration>

What is the simplest way to save settings for "GroupA\Section1\item1"?

TIA.

AddThis Social Bookmark Button