Hi everybody))

Please give an example of multiple polymorphism in C # .....does it exist?))
Thanks in advance!

Recommended Answers

All 9 Replies

What does "multiple polymorphism" mean to you?

as I know there's a multiple inheritance....but also there's a first one - Multiple polymorphism )))

I'd like to know what you think "multiple polymorphism" means, other than something that isn't multiple inheritance. Then we can talk about whether you can use it in C#.

first i will tell what is polymorphism

there are two types of polymorphism:static and dynamic

static::which take place during compile time

dynamic::take place at run time,which is appreciated by virtual function

eg::float area(float a,float b)
{
return A*b;
}

function name is same where arguments only change A and b are arguments;

Exact meaning in simple word::one name having different forms or different behaviour of an instance depending upon the situations.


friend these are basics if u want more about polymorphism means i will provide you ok

commented: ++++++++++ +1

shajis001 ok)) firstly i'll deal I'll deal with the first two definitions))

I was trying to get at what you meant by your original question--is it just that you're trying to get a handle on polymorphism in general, or do you have some idea of what "multiple polymorphism" is supposed to mean, and you're looking for that feature in C#?

first i will tell what is polymorphism

there are two types of polymorphism:static and dynamic

static::which take place during compile time

dynamic::take place at run time,which is appreciated by virtual function

eg::float area(float a,float b)
{
return A*b;
}

function name is same where arguments only change A and b are arguments;

That's a poor explanation.

Exact meaning in simple word::one name having different forms or different behaviour of an instance depending upon the situations.

Getting there. How about:

"Polymorphism is a programming language feature that allows values of different data types to be handled using a uniform interface."

friend these are basics if u want more about polymorphism means i will provide you ok

...or you could take the extra five seconds and link something:

http://en.wikipedia.org/wiki/Type_polymorphism

http://en.wikipedia.org/wiki/Polymorphism_in_object-oriented_programming


You get polymorphism in C# with abstract classes, interfaces, and generic types. C# doesn't have multiple inheritance, but you can implement multiple interfaces if you want.

commented: ++++++ +1
commented: Correct! +11

+1 @gusano79 for nice response.

what about multiple polymorphism exactly ?

You must have to read posts of @gusano79 and wiki articles.

I don't want to paste a link but it not easy and feasible to explain types polymorphism. Text from wiki:

In software engineering, double dispatch is a special form of multiple dispatch, and a mechanism that dispatches a function call to different concrete functions depending on the runtime types of two objects involved in the call.

Another article from Javaworld:

Multiple polymorphism is when an abstract class uses another abstract class.

commented: +++++ +1

adatapost , gusano79 thank you ) I really was not careful ....

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.