Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can web methods be overloaded?

Tags:

c#

.net

oop

I have built a regular .NET asmx service. How do i overload web methods in this service?

like image 568
Developer Avatar asked Oct 05 '09 21:10

Developer


People also ask

Can we overload method in web API?

Method overloading can be done in a web service with the following things: By changing the number of parameters used. By changing the order of parameters. By using different data types for the parameters.

Which methods can be overloaded?

Overloading happens when you have two methods with the same name but different signatures (or arguments). In a class we can implement two or more methods with the same name. Overloaded methods are differentiated based on the number and type of parameter passed as arguments to the methods.

What Cannot overload method?

Can we overload methods that differ only by static keyword? We cannot overload two methods in Java if they differ only by static keyword (number of parameters and types of parameters is same). See following Java program for example.

Can public methods be overloaded?

does overloading apply to methods in sub/super classes, or only to methods of one class can be overloaded? The Answer is Yes. All the public and protected methods of the super class are derived in child class. You can overload derived methods.


1 Answers

WS-I (web services interoperability) does not support overloading.

like image 110
Martin v. Löwis Avatar answered Oct 13 '22 00:10

Martin v. Löwis