Why are used in wcf for interface concept
All ready provide interface and abstract class concept in c# . but im create servics i am used interface for creating service i am not used abstract class and class.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Akkiraju IvaturiRank #473 · 5.3K reputationPosted Aug 4, 2012, 9:42 PM EDT
Basically we need to look into following aspects to find out why:
1. Interfaces provides you the skelton of all the methods that the service class supports (in oops, any class that implements the interface should implement all the methods of the interface and any can implement many interfaces, but can inherit only one class).
2. If you version the services, interfaces are the best way to handle the versioning of services.
You can refer to my article on versioning http://ilovemicrosoft.blogspot.com/search/label/WCF%20service%20versioning
3. Abstract classes may have non abstract methods so to be pure abstract entity interface is the correct way of implementation.
Hemant SrivastavaRank #581 · 4.2K reputationPosted Aug 3, 2012, 6:39 AM EDT
Guddoo Chauhan74 reputationPosted Aug 5, 2012, 9:36 PM EDT
Akkiraju IvaturiRank #473 · 5.3K reputationPosted Aug 5, 2012, 9:41 PM EDT
Chiranjeevi Bandla2 reputationPosted Aug 6, 2015, 4:25 AM EDT
sushil kumarRank #1,289 · 1.3K reputationPosted Feb 1, 2016, 12:57 AM EST