Can a WCF operation contract return a boolean value?
Is the following signature correct (in VB)?
<OperationContract()>
Function Validate(Byval Param As Integer) As Boolean
I heard t开发者_如何转开发hat "Operation contracts" cannot return boolean values. Is it true or it is a blunder? Of course, I did not test it yet.
According to this document and the example provided:
http://msdn.microsoft.com/en-us/library/ms730255.aspx
if you are using a MessageContract parameter, then you CAN NOT return boolean.
Yes, you can return a boolean.
Operation Contracts can return almost all types, including boolean, void.
精彩评论