O'Reilly logo

Applied XML Programming for Microsoft® .NET by Dino Esposito

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Managing Configuration Settings

Application settings, including general user preferences and state information, are saved in the <appSettings> section of a configuration file. The following code snippet shows some typical output:

<configuration>
   <appSettings>
      <add key="LastLeftTopPosition" value="100,200" />
      <add key="LastSize" value="300,400" />
   </appSettings>
</configuration>

The settings in the preceding sample file refer to the position and size of a window when the application is closed. The syntax of the <appSettings> section is defined as follows:

<appSettings>
   <add key="..." value="..." />
   <remove key="..." />
   <clear />
</appSettings>

The <add> element adds a new setting to the internal collection. This ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required