WCF 服务是否公开属性? [英] Do WCF Services Expose Properties?

查看:28
本文介绍了WCF 服务是否公开属性?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在实现 WCF 服务所需的接口中,我使用 [ServiceContract()] 属性声明主类,并使用 [OperationContract()] 声明任何公开的方法.

In the interface required to implement a WCF service, I declare the main class with the [ServiceContract()] attribute and any exposed method with [OperationContract()].

如何公开公共属性?谢谢

How can i expose public properties? Thanks

推荐答案

你不能.这不是它的工作原理.仅方法.

You can't. That's not how it works. Methods only.

这篇关于WCF 服务是否公开属性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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