AppSettings与applicationSettings(.NET app.config / Web.config)的优缺点
在开发.NET Windows Forms Application时,我们可以在这些App.config标签之间进行选择以存储我们的配置值。哪一个更好? <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>