Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 125119
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T05:06:30+00:00 2026-05-11T05:06:30+00:00

When developing a .NET Windows Forms Application we have the choice between those App.config

  • 0

When developing a .NET Windows Forms Application we have the choice between those App.config tags to store our configuration values. Which one is better?

<configuration>    <!-- Choice 1 -->   <appSettings>     <add key='RequestTimeoutInMilliseconds' value='10000'/>   </appSettings>    <!-- Choice 2 -->   <configSections>     <sectionGroup name='applicationSettings' type='System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c5612342342' >         <section name='Project1.Properties.Settings' type='System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c5612342342' requirePermission='false' />     </sectionGroup>   </configSections>   <applicationSettings>     <Project1.Properties.Settings>       <setting name='TABLEA' serializeAs='String'>         <value>TABLEA</value>       </setting>     </Project1.Properties.Settings>   </applicationSettings>  </configuration> 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T05:06:30+00:00Added an answer on May 11, 2026 at 5:06 am

    The basic <appSettings> is easier to deal with – just slap in a <add key='....' value='...' /> entry and you’re done.

    The downside is: there’s no type-checking, e.g. you cannot safely assume your number that you wanted to configure there really is a number – someone could put a string into that setting….. you just access it as ConfigurationManager['(key)'] and then it’s up to you to know what you’re dealing with.

    Also, over time, the <appSettings> can get rather convoluted and messy, if lots of parts of your app start putting stuff in there (remember the old windows.ini file? :-)).

    If you can, I would prefer and recommend using your own configuration sections – with .NET 2.0, it’s really become quite easy, That way, you can:

    • a) Define your configuration settings in code and have them type-safe and checked
    • b) You can cleanly separate YOUR settings from everyone else’s. And you can reuse your config code, too!

    There’s a series of really good articles on you to demystify the .NET 2.0 configuration system on CodeProject:

    1. Unraveling the mysteries of .NET 2.0 configuration

    2. Decoding the mysteries of .NET 2.0 configuration

    3. Cracking the mysteries of .NET 2.0 configuration

    Highly recommended! Jon Rista did a great job explaining the configuration system in .NET 2.0.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing a windows based application in .net. I have two forms. Form2
I am developing a .NET 3.5 Windows Forms app. I have two projects, the
I am developing a Windows Forms application (.NET 2.0, VS 2005). I have a
We are developing a .NET 3.5 application (Windows Forms), which is comprised of 3
I'm developing C# .NET windows Forms application. In which I've a main window and
I'm developing a .NET Windows Forms application. I use the model-view-presenter design pattern, supervising
I'm developing a Windows Forms Application in Visual Basic .NET with Visual Studio 2008.
I am developing an Windows Forms application using VB.NET that offers the user to
I have developed a .Net 3.5 windows forms application. I also want to design
I'm developing a windows forms application using VB.NET. I'm currently working on DataReport (by

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.