C#配置文件(App.config)

以下代码配置在App.config中
<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <configSections>
    </configSections>
    <connectionStrings>
      //Data Source路径是在debug下
        <add name="ProcessSoftware.Properties.Settings.ProcessSoftwareConnectionString"
            connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Data/ProcessSoftware.mdb"
            providerName="System.Data.OleDb" />
        <add name="MysqlConnectionString"
            connectionString="Server=localhost;Database=rsda;Uid=root;Pwd=root;CharSet=utf8"
            providerName="MySQLProv" />
    </connectionStrings>
  <appSettings>
    <add key="replace" value="bin\Debug\"/>
  </appSettings>
    <startup>
    <supportedRuntime version="v2.0.50727"/></startup>
</configuration>

 

你可能感兴趣的:(C#配置文件(App.config))