我可以在wcf中使用抽象类代替接口吗? [英] Can I use abstract class in place of interface in wcf ?
本文介绍了我可以在wcf中使用抽象类代替接口吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
感谢您的回答和建议。
提前致谢!
Anand Vemuri。
解决方案
否。
见这里: https://social.msdn.microsoft.com/Forums/vstudio/en-US/e7f919b3-2c26-434c-bdec-0b8d2e463d39/can-we-use-abstract-class-instead-of -interface-with-service-contract-in-wcf?forum = wcf [ ^
否。如果使用抽象类,它将在托管服务时抛出异常。
I would appreciate your answer and suggestions.
Thanks in advance!
Anand Vemuri.
解决方案
No.
See here: https://social.msdn.microsoft.com/Forums/vstudio/en-US/e7f919b3-2c26-434c-bdec-0b8d2e463d39/can-we-use-abstract-class-instead-of-interface-with-service-contract-in-wcf?forum=wcf[^]
No. If you use abstract class it will throw an exception while hosting the service.
这篇关于我可以在wcf中使用抽象类代替接口吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文