在调试中更改xml文件而不重启应用程序 [英] change xml file in debug without restart application

查看:148
本文介绍了在调试中更改xml文件而不重启应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的WinForm应用程序,包括客户端和服务器,客户端使用WCF控制服务器。当客户端以XML的形式更改服务器以维护服务器时,为什么需要重启服务器才能使用修改后的值?

My WinForm application procedures, including client and server, the client uses WCF control server. When the client changes to the server in the form of XML to maintain the server, why need to restart the server can use the modified values?

推荐答案

如果您的xml是在应用程序中硬编码将需要重新启动。尝试使用io.streamreader从text / xml文件中读取它。试一下 - 捕捉异常的地方。现在您可以更改xml文件并重新打开而无需重新启动。
If your xml is hardcoded in the application a restart will be required. Try reading it from a text/xml file using io.streamreader. place a try - catch where the exception is being thown. Now you can change your xml file and reopen without having to restart.


这篇关于在调试中更改xml文件而不重启应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆