Quote:Both classes and interfaces represent a grouping of functionality and, therefore, both can be used to define a WCF service contract. However, it is recommended that you use interfaces because they directly model service contracts. Without an implementation, interfaces do no more than define a grouping of methods with certain signatures. Implement a service contract interface and you have implemented a WCF service. All the benefits of managed interfaces apply to service contract interfaces: Service contract interfaces can extend any number of other service contract interfaces.A single class can implement any number of service contracts by implementing those service contract interfaces.You can modify the implementation of a service contract by changing the interface implementation, while the service contract remains the same.You can version your service by implementing the old interface and the new one. Old clients connect to the original version, while newer clients can connect to the newer version.
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)