Delegate overloading

E

Edward Diener

According to the documentation, delegates can not be overloaded.

Does this mean that a delegate must have a distinct name in all namespaces,
or does this mean that a delegate must have a distinct name in any one given
namespace ? I sincerely hope it is the latter.
 
C

Chris Jackson

Well, if minimal constraint is your goal, you are going to be pleased.
Overloading is creating several methods with the same name *in the same
class*. For example, these are overloaded methods:

Add(int a, int b) {return a+b;}
Add(int a, int b, int c) {return a+b+c;}
Add(int a, int b, int c, int d) {return a+b+c+d;}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top