App.config中 除了connectionStrings和appSettings字节,其它字节的数据怎么读取,更新,删除
dnvcc 2008-10-04 10:35:25 各位大虾好!
请问在 App.config中 除了connectionStrings和appSettings字节,其它字节的数据怎么读取,更新,删除,
如:
<configuration>
<appSettings>
</appSettings>
<applicationSettings>
<ShopGuide.Properties.Settings>
<setting name="ShopGuide_localhost_Service2Net" serializeAs="String">
<value>http://192.168.2.43/Plu/Service2Net.asmx</value>
</setting>
<setting name="ShopGuide_XtService_BapWebService" serializeAs="String">
<value>http://192.9.2.11/WSAServices_xt/BapWebService.asmx</value>
</setting>
</ShopGuide.Properties.Settings>
</applicationSettings>
</configuration>
如要读取ShopGuide_localhost_Service2Net、http://192.9.2.11/WSAServices_xt/BapWebService.asmx
更新http://192.9.2.11/WSAServices_xt/BapWebService.asmx这个值,
删除“ <setting name="ShopGuide_XtService_BapWebService" serializeAs="String">
<value>http://192.9.2.11/WSAServices_xt/BapWebService.asmx</value>
</setting>”这个字段。
先谢谢各位!