我最近看到一个WCF服务通过ref参数声明操作合同.
我不知道为什么要做出这个设计决定(操作无效),而且,根据我的WCF知识,我无法说这是否是一个好的做法.或者如果这不相关.
你怎么看?
解决方法
但是,根据此Microsoft文章,WCF调用的行为与远程过程调用完全相同,并且ByRef参数可用于返回数据: –
http://msdn.microsoft.com/en-us/library/ms733070.aspx
请参阅以下部分:Out和Ref Parameters
In most cases,you can use in parameters (ByVal in Visual Basic) and out and ref parameters (ByRef in Visual Basic). Because both out and ref parameters indicate that data is returned from an operation,an operation signature such as the following specifies that a request/reply operation is required even though the operation signature returns void.