https://tnakamura.hatenablog.com/entry/20091202/configsource
.netの機能として、セクションの中身を別ファイルに移す機能が存在するため以下のようにするだけで特に何のコードも書かずに設定の一部を別ファイルに移すことができる。
app.config
<?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings configSource="hoge.config" /> </configuration>
hoge.config
<?xml version="1.0" encoding="utf-8" ?> <appSettings> <add key="hogehoge" value="fugafuga" /> </appSettings>