Is overloading possible in web services?

Answer Posted / neha

Yes it is possible but you have to give different alias name to the web method so that ambiguity can be avoided

---method will be call from application by the name AddInt
[WebMethod Name ="AddInt"]
public void Add(){}//implement code for adding 2 int variable

---------In this step even if you dont give name attribute it will work and method will be called by name Add.
[WebMethod Name ="AddFloat"]
public void Add(){}//implement code for adding 2 float variable

else it will give error

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

6. Tell us about a time when you failed to meet a deadline. What were the repercussions?

1818


What is a ashx file?

650


Disable Mouse right click on web page in asp.net?

666


How would you get asp.net running in apache web servers?

619


Explain the path instructions in xaml?

653






Demonstrate Render and PreRender?

691


Describe how to implement globalization and localization in the use interface in .net.

653


What is .net remoting?

677


What is the use of web.config and machine.config files?

735


What is an example of an application service provider?

546


How you will manage the state of ASP.NET controls?

652


What’s the catch?

710


Where session id is stored?

630


Explain how caching in asp.net 2.0 is different from caching in asp.net 1.1?

626


What is the Difference between MVC And MVP design pattrens

2308