app.config 信息如下
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup,System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="Model.set" type="System.Configuration.ClientSettingsSection,System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
</sectionGroup>
</configSections>
<userSettings>
<Model.set>
<setting name="Connection" serializeAs="String">
<value>Data Source=192.168.0.254;Initial Catalog=DB;User ID=fhz;Password=fhzadmin;</value>
</setting>
<setting name="Path" serializeAs="String">
<value>D:\code\</value>
</setting>
</Model.set>
</userSettings>
</configuration>
怎么读取呢????
ConfigurationManager.AppSettings["Connection"].ToString();
读不到呃
慕后森
慕容708150
呼如林
qq_遁去的一_1