Click here to Skip to main content
15,887,746 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
Hi Everyone,

Today i got an interview question that can we Override methods in WCF or Web Service.

I just want to know that can we Override WCF Methods or Web services Methods.If Yes then How?

One more Question i have .

Why we use Interface in WCF Services instead of Classes.Why Microsoft introduced interface in WCF.
Posted
Comments
Sergey Alexandrovich Kryukov 23-Jul-13 15:34pm    
This is pretty hard to explain, you should better ask Microsoft, but using interfaces is certainly very natural. The whole notion "instead of" is wrong. It's not "instead"... And I don't understand which methods you are going to override. If this is the interface method, it is "implemented", not "overridden", but you can always make the implementing method virtual and override in some descendant class.
—SA
Ashad25 24-Jul-13 3:09am    
Hi i didn't get your answer exactly about why we use interfaces in wcf services. my question is instead of declaring methods in interface i can use a class and define those methods.Then why Microsoft come with one extra Interface.What is the benefit of doing so.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900