Home > Interview Questions > WCF > Can we define WCF Service contract on class rather than interface?

Can we define WCF Service contract on class rather than interface?

by SARNAM SINGH   on 13/04/2016   Category: WCF   |  Level: Beginner   |  Views: 1102    |  Points: 25     |  Silver 


Yes.


« Select 1/2 what is the result of this query?
» Is it possible to design the WCF service supporting both XML and JSON messaging format?
Post Question  |  Question Home

Recent Posts

User Responses


  Re :Can we define WCF Service contract on class rather than interface?   
Posted by Jomgrg
on 01/08/2017
Points : 5

Yes we can, but better use interface it will separate definition of your service from implementation. The user should not know how you implemented but he should know what operations he can do.

Submit feedback about this code snippet

Please sign in to post feedback

Latest Posts