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.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
sushil kumarPosted Feb 1, 2016, 5:57 AM
Chiranjeevi BandlaPosted Aug 6, 2015, 8:25 AM
Akkiraju IvaturiPosted Aug 6, 2012, 1:41 AM
Guddoo ChauhanPosted Aug 6, 2012, 1:36 AM
Akkiraju IvaturiPosted Aug 5, 2012, 1:42 AM
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 SrivastavaPosted Aug 3, 2012, 10:39 AM