Click here to Skip to main content
15,905,867 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
I friends, I have a confusion about Ad-hoc polymarphism in c#.net. Some of the site's given Overloading and in other sites overriding. Ad-hoc polymorphism is Overload or overriding and also give me some examples about Ad-hoc polymorphism.
Posted

Christopher Strachey described the distinction between parametric polymorphism and ad-hoc polymorphism in 1967, so polymorphism must have already existed then.
Read below for more information:
http://en.wikipedia.org/wiki/Ad_hoc_polymorphism

Basics of Ad-hoc Polymorphism
Ad-hoc Polymorphism (is also known as function overloading or operator overloading) consists in creating multiple functions with the same name but that have different headers. The functions can be differentiated by their parameters', by their type and number. We say that function Foo() is different from Foo(int x) and also Foo(int x) is different from Foo(float x)
 
Share this answer
 
In my opinion,Ad hoc polymorphism is basically a work of function overloading or operator overloading not overriding.Catch some good example here:
Ad-hoc Polymorphism[^]
What does Ad Hoc Polymorphism mean[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900