In WCF, is returning a void return type returns anything ?

 Posted by Akiii on 10/14/2012 | Category: WCF Interview questions | Views: 4846 | Points: 40
Answer:

[ServiceContract]

public interface IService1
{
[OperationContract]
void Employee(string value);
}


In the above case, the response message is still being sent back to the client. The difference is it sends an empty SOAP body.
So, returning void doesn't mean it will not return anything to the Client !


Thanks and Regards
Akiii


| Alert Moderator 

Comments or Responses

Login to post response