Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The basic <code>&lt;appSettings&gt;</code> is easier to deal with - just slap in a <code>&lt;add key="...." value="..." /&gt;</code> entry and you're done.</p> <p>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 <code>ConfigurationManager["(key)"]</code> and then it's up to you to know what you're dealing with. </p> <p>Also, over time, the <code>&lt;appSettings&gt;</code> can get rather convoluted and messy, if lots of parts of your app start putting stuff in there (remember the old windows.ini file? :-)).</p> <p>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: </p> <ul> <li>a) Define your configuration settings in code and have them type-safe and checked </li> <li>b) You can cleanly separate <em>YOUR</em> settings from everyone else's. And you can reuse your config code, too!</li> </ul> <p>There's a series of really good articles on you to demystify the .NET 2.0 configuration system on CodeProject:</p> <ol> <li><p><a href="http://www.codeproject.com/KB/dotnet/mysteriesofconfiguration.aspx" rel="noreferrer">Unraveling the mysteries of .NET 2.0 configuration</a> </p></li> <li><p><a href="http://www.codeproject.com/KB/dotnet/mysteriesofconfiguration2.aspx" rel="noreferrer">Decoding the mysteries of .NET 2.0 configuration</a></p></li> <li><p><a href="http://www.codeproject.com/KB/dotnet/mysteriesofconfiguration3.aspx" rel="noreferrer">Cracking the mysteries of .NET 2.0 configuration</a></p></li> </ol> <p>Highly recommended! Jon Rista did a great job explaining the configuration system in .NET 2.0.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload