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

Why select Web API?

572


What do you understand by aggregate dependency?

627


Describe a bubbled event and how it is used ?

627


Can we have multiple web config files for an asp.net application?

550


What are Session states available and its Uses?

1699






What is mvc in asp.net tutorial? : Asp.Net MVC

553


What is asp.net file?

641


What is owin authentication?

528


What is Web Server Control Templates.?

595


What is AutoEventWireup attribute for ?

612


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

580


What is the difference between exe and dll?

561


What tags do you need to add within the asp:datagrid tags to bind columns manually? How?

526


How can we update records in gridview?Is there any appropriate code for it?

1610


Why do you use the app_code folder in asp.net?

560