Go to DotNetFunda.com
 Online : 1571 |  Welcome, Guest!   Login
 
Home > Interview Questions > WCF Interview Questions > How to deal with operation overloading w ...

  • Download the OOPS, ASP.NET and ADO.NET Training Videos for FREE, click here.

call for mock interview

WCF Interview Questions

How to deal with operation overloading while exposing the WCF services?

Author: Poster | Posted on: 3/31/2009 5:25:23 PM | Category: WCF | Views:1115 |  Print | Asked In: Many Interviews


Answer:
By default overload operations (methods) are not supported in WSDL based operation. However by using Name property of OperationContract attribute, we can deal with operation overloading scenario.

[ServiceContract]

interface ICalculator
{
[OperationContract(Name = "AddInt")]
int Add(int arg1,int arg2);

[OperationContract(Name = "AddDouble")]
double Add(double arg1,double arg2);
}


Notice that both method name in the above interface is same (Add), however the Name property of the OperationContract is different. In this case client proxy will have two methods with different name AddInt and AddDouble.

Interesting?   Share and Bookmark this


Navigate to:

 Submit Interview Questions

How to set the timeout property for the WCF Service client call? ...

What is a deadlock? ...

Random Interview Questions
Help: If for some reason you are getting the same question by clicking Next Question or Previous Question, Try clicking Categories link above.

Related interview questions



Advertisement

About Us | The Team | Advertise | Contact Us | Feedback | Privacy Policy | Terms of Use | Link Exchange | Members | Go Top
General Notice: If you found copied contents on this page, please let us know the original source along with your correct email id (to communicate) for further action.
All rights reserved to DotNetFunda.Com. Logos, company names used here if any are only for reference purposes and they may be respective owner's right or trademarks.
(Best viewed in IE 6.0+ or Firefox 2.0+ at 1024 * 768 or higher)