WCF Method Overloading
Why WCF not supporting Method Overloading Directly?
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.
Prashant KoliPosted May 12, 2015, 7:02 AM
However in the servicecontract interface, you can try something like this to achieve it:
[OperationContract(Name="MyMethod1")]
string MyMethod(int arg1,int arg2);
[OperationContract(Name = "MyMethod2")]
string MyMethod(double arg1, double arg2);
These will be exposed as two separate methods such as MyMethod1 and MyMethod2 by the WSDL and proxy class and you can call them as per the need.
rajat kumarPosted Feb 17, 2015, 2:20 AM
Suraj SahooPosted Feb 5, 2015, 12:59 PM
http://www.codeproject.com/Tips/656042/Method-Overloading-in-WCF
The above link article is a very nice article on this query you have posted. I hope this helps you get some idea on this if you have not been to this link before.
Thanks