what is the use of over loaded functions.

  • Thread starter Thread starter veebhudhi.chandramouli
  • Start date Start date
Instead of using same name i can use different name,
is there any specific purpous is there to define the polymorphic
overloaded functions in c#

For the record, you shouldn't use the phrase "polymorphic overloaded
functions". You are confusing two very different concepts,
polymorphism (which is necessary for an Object Oriented language), and
overloading (which is not).

You are right to say that overloading just lets you reuse a name, but
that is actually a fairly big advantage. In my old job, we had a
library of reusable routines that anyone could contribute to. I
remember some of the important routines: Sort (which sorted an
integer array), InSort2 (which sorted a short array), CHSort (which
sorted strings), SortB (which sorted bytes), etc. It got messy. It
is much nicer now with overloading, and we can call of them "Sort".
 

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

Back
Top